Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
ca4c2878
C
cat
项目概览
梦中观雨
/
cat
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ca4c2878
编写于
7月 15, 2014
作者:
Y
youyong205
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify the app config
上级
fdf3062a
变更
12
展开全部
显示空白变更内容
内联
并排
Showing
12 changed file
with
548 addition
and
410 deletion
+548
-410
cat-core/pom.xml
cat-core/pom.xml
+1
-1
cat-core/src/main/java/com/dianping/cat/build/AppDatabaseConfigurator.java
.../java/com/dianping/cat/build/AppDatabaseConfigurator.java
+1
-1
cat-core/src/main/java/com/dianping/cat/build/ComponentsConfigurator.java
...n/java/com/dianping/cat/build/ComponentsConfigurator.java
+1
-1
cat-core/src/main/java/com/dianping/cat/config/app/AppDataCommandTableProvider.java
.../dianping/cat/config/app/AppDataCommandTableProvider.java
+42
-0
cat-core/src/main/resources/META-INF/dal/jdbc/app-codegen.xml
...core/src/main/resources/META-INF/dal/jdbc/app-codegen.xml
+4
-4
cat-core/src/main/resources/META-INF/dal/jdbc/app-dal.xml
cat-core/src/main/resources/META-INF/dal/jdbc/app-dal.xml
+63
-2
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
+1
-1
cat-home/pom.xml
cat-home/pom.xml
+0
-5
cat-home/src/main/java/com/dianping/cat/build/ComponentsConfigurator.java
...n/java/com/dianping/cat/build/ComponentsConfigurator.java
+103
-89
cat-home/src/main/java/com/dianping/cat/report/view/NavigationBar.java
...main/java/com/dianping/cat/report/view/NavigationBar.java
+2
-0
cat-home/src/main/resources/META-INF/plexus/components.xml
cat-home/src/main/resources/META-INF/plexus/components.xml
+326
-302
script/Cat.sql
script/Cat.sql
+4
-4
未找到文件。
cat-core/pom.xml
浏览文件 @
ca4c2878
...
...
@@ -27,7 +27,7 @@
<dependency>
<groupId>
org.unidal.framework
</groupId>
<artifactId>
dal-jdbc
</artifactId>
<version>
2.
0.4
</version>
<version>
2.
1.1
</version>
</dependency>
<dependency>
<groupId>
org.jboss.netty
</groupId>
...
...
cat-core/src/main/java/com/dianping/cat/build/AppDatabaseConfigurator.java
浏览文件 @
ca4c2878
...
...
@@ -11,7 +11,7 @@ final class AppDatabaseConfigurator extends AbstractJdbcResourceConfigurator {
public
List
<
Component
>
defineComponents
()
{
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
// all.add(defineJdbcDataSourceComponent("app", "com.mysql.jdbc.Driver", "jdbc:mysql://127.0.0.1:3306/
app
", "root", "***", "<![CDATA[useUnicode=true&autoReconnect=true]]>"));
// all.add(defineJdbcDataSourceComponent("app", "com.mysql.jdbc.Driver", "jdbc:mysql://127.0.0.1:3306/
cat
", "root", "***", "<![CDATA[useUnicode=true&autoReconnect=true]]>"));
defineSimpleTableProviderComponents
(
all
,
"app"
,
com
.
dianping
.
cat
.
app
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
app
.
_INDEX
.
getDaoClasses
());
...
...
cat-core/src/main/java/com/dianping/cat/build/ComponentsConfigurator.java
浏览文件 @
ca4c2878
cat-core/src/main/java/com/dianping/cat/config/app/AppDataCommandTableProvider.java
0 → 100644
浏览文件 @
ca4c2878
package
com.dianping.cat.config.app
;
import
java.util.Map
;
import
org.unidal.dal.jdbc.QueryEngine
;
import
org.unidal.dal.jdbc.mapping.TableProvider
;
import
com.dianping.cat.app.AppDataCommand
;
public
class
AppDataCommandTableProvider
implements
TableProvider
{
private
String
m_logicalTableName
=
"app-data-command"
;
private
String
m_physicalTableName
=
"app_data_command"
;
private
String
m_dataSourceName
=
"app"
;
@Override
public
String
getDataSourceName
(
Map
<
String
,
Object
>
hints
)
{
return
m_dataSourceName
;
}
@Override
public
String
getLogicalTableName
()
{
return
m_logicalTableName
;
}
@Override
public
String
getPhysicalTableName
(
Map
<
String
,
Object
>
hints
)
{
AppDataCommand
command
=
(
AppDataCommand
)
hints
.
get
(
QueryEngine
.
HINT_DATA_OBJECT
);
return
m_physicalTableName
+
"_"
+
command
.
getCommandId
();
}
public
void
setDataSourceName
(
String
dataSourceName
)
{
m_dataSourceName
=
dataSourceName
;
}
public
void
setLogicalTableName
(
String
logicalTableName
)
{
m_logicalTableName
=
logicalTableName
;
}
}
\ No newline at end of file
cat-core/src/main/resources/META-INF/dal/jdbc/app-codegen.xml
浏览文件 @
ca4c2878
...
...
@@ -12,10 +12,10 @@
<member
name=
"connnect-type"
field=
"connnect_type"
value-type=
"int"
length=
"3"
nullable=
"false"
/>
<member
name=
"code"
field=
"code"
value-type=
"int"
length=
"5"
nullable=
"false"
/>
<member
name=
"platform"
field=
"platform"
value-type=
"int"
length=
"3"
nullable=
"false"
/>
<member
name=
"access-number"
field=
"access_number"
value-type=
"
String"
length=
"16777215
"
nullable=
"false"
/>
<member
name=
"response-sum-time"
field=
"response_sum_time"
value-type=
"
String"
length=
"16777215
"
nullable=
"false"
/>
<member
name=
"request-package"
field=
"request_package"
value-type=
"
String"
length=
"16777215
"
nullable=
"false"
/>
<member
name=
"response-package"
field=
"response_package"
value-type=
"
String"
length=
"16777215
"
nullable=
"false"
/>
<member
name=
"access-number"
field=
"access_number"
value-type=
"
long"
length=
"19
"
nullable=
"false"
/>
<member
name=
"response-sum-time"
field=
"response_sum_time"
value-type=
"
long"
length=
"19
"
nullable=
"false"
/>
<member
name=
"request-package"
field=
"request_package"
value-type=
"
long"
length=
"19
"
nullable=
"false"
/>
<member
name=
"response-package"
field=
"response_package"
value-type=
"
long"
length=
"19
"
nullable=
"false"
/>
<member
name=
"creation-date"
field=
"creation_date"
value-type=
"Date"
nullable=
"false"
/>
<var
name=
"key-id"
value-type=
"int"
key-member=
"id"
/>
<primary-key
name=
"PRIMARY"
members=
"id"
/>
...
...
cat-core/src/main/resources/META-INF/dal/jdbc/app-dal.xml
浏览文件 @
ca4c2878
<?xml version="1.0" encoding="UTF-8"?>
<entities
do-package=
"com.dianping.cat.app"
gen=
"true"
/>
<entities
do-package=
"com.dianping.cat.app"
gen=
"true"
>
<entity
name=
"app-data-command"
table=
"app_data_command"
alias=
"adc"
>
<member
name=
"access-number"
field=
"access_number"
value-type=
"long"
length=
"19"
nullable=
"false"
/>
<member
name=
"response-sum-time"
field=
"response_sum_time"
value-type=
"long"
length=
"19"
nullable=
"false"
/>
<member
name=
"request-package"
field=
"request_package"
value-type=
"long"
length=
"19"
nullable=
"false"
/>
<member
name=
"response-package"
field=
"response_package"
value-type=
"long"
length=
"19"
nullable=
"false"
/>
<member
name=
"creation-date"
field=
"creation_date"
value-type=
"Date"
nullable=
"false"
/>
<member
name=
"access-number-sum"
value-type=
"long"
all=
"false"
select-expr=
"sum(access_number)"
length=
"19"
nullable=
"false"
/>
<member
name=
"response-sum-time-sum"
value-type=
"long"
all=
"false"
select-expr=
"sum(response-sum-time)"
length=
"19"
nullable=
"false"
/>
<var
name=
"key-id"
value-type=
"int"
key-member=
"id"
/>
<var
name=
"command-id"
value-type=
"int"
/>
<readsets>
<readset
name=
"DATA"
>
<member
name=
"minute-order"
/>
<member
name=
"access-number-sum"
/>
<member
name=
"response-sum-time-sum"
/>
</readset>
</readsets>
<query-defs>
<query
name=
"insert-data"
type=
"INSERT"
>
<param
name=
"command-id"
/>
<statement>
<![CDATA[INSERT INTO <TABLE/>
(
<FIELDS/>
)
VALUES(
<VALUES/>
)]]>
</statement>
</query>
<query
name=
"find-data"
type=
"SELECT"
multiple=
"true"
>
<param
name=
"command-id"
/><param
name=
"period"
/>
<param
name=
"period"
/>
<param
name=
"city"
/>
<param
name=
"operator"
/>
<param
name=
"network"
/>
<param
name=
"app-version"
/>
<param
name=
"connnect-type"
/>
<param
name=
"code"
/>
<param
name=
"platform"
/>
<statement>
<![CDATA[SELECT <FIELDS/>
FROM
<TABLE/>
WHERE
<FIELD
name=
'period'
/>
= ${period}
<IF
type=
'NOT_ZERO'
field=
'city'
>
AND
<FIELD
name=
'city'
/>
= ${city}
</IF>
<IF
type=
'NOT_ZERO'
field=
'operator'
>
AND
<FIELD
name=
'operator'
/>
= ${operator}
</IF>
<IF
type=
'NOT_ZERO'
field=
'network'
>
AND
<FIELD
name=
'network'
/>
= ${network}
</IF>
<IF
type=
'NOT_ZERO'
field=
'app-version'
>
AND
<FIELD
name=
'app-version'
/>
= ${app-version}
</IF>
<IF
type=
'NOT_ZERO'
field=
'connnect-type'
>
AND
<FIELD
name=
'connnect-type'
/>
= ${connnect-type}
</IF>
<IF
type=
'NOT_ZERO'
field=
'code'
>
AND
<FIELD
name=
'code'
/>
= ${code}
</IF>
<IF
type=
'NOT_ZERO'
field=
'platform'
>
AND
<FIELD
name=
'platform'
/>
= ${platform}
</IF>
group by
<FIELD
name=
'minute-order'
/>
]]>
</statement>
</query>
</query-defs>
</entity>
</entities>
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
浏览文件 @
ca4c2878
...
...
@@ -27,7 +27,7 @@
<jdbc
package=
"com.dianping.cat.app"
name=
"app"
>
<datasource>
<driver>
com.mysql.jdbc.Driver
</driver>
<url>
jdbc:mysql://127.0.0.1:3306/
app
</url>
<url>
jdbc:mysql://127.0.0.1:3306/
cat
</url>
<user>
root
</user>
<password>
password
</password>
<properties>
useUnicode=true
&
autoReconnect=true
</properties>
...
...
cat-home/pom.xml
浏览文件 @
ca4c2878
...
...
@@ -96,11 +96,6 @@
<version>
2.0.4
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.unidal.framework
</groupId>
<artifactId>
dal-jdbc
</artifactId>
<version>
2.0.4
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-email
</artifactId>
...
...
cat-home/src/main/java/com/dianping/cat/build/ComponentsConfigurator.java
浏览文件 @
ca4c2878
...
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
org.unidal.dal.jdbc.datasource.JdbcDataSourceDescriptorManager
;
import
org.unidal.dal.jdbc.mapping.TableProvider
;
import
org.unidal.initialization.DefaultModuleManager
;
import
org.unidal.initialization.Module
;
import
org.unidal.initialization.ModuleManager
;
...
...
@@ -12,6 +13,7 @@ import org.unidal.lookup.configuration.Component;
import
com.dianping.cat.CatHomeModule
;
import
com.dianping.cat.ServerConfigManager
;
import
com.dianping.cat.config.app.AppDataCommandTableProvider
;
import
com.dianping.cat.consumer.dependency.DependencyAnalyzer
;
import
com.dianping.cat.consumer.metric.MetricAnalyzer
;
import
com.dianping.cat.consumer.metric.MetricConfigManager
;
...
...
@@ -84,8 +86,41 @@ public class ComponentsConfigurator extends AbstractResourceConfigurator {
generatePlexusComponentsXmlFile
(
new
ComponentsConfigurator
());
}
@Override
public
List
<
Component
>
defineComponents
()
{
private
List
<
Component
>
defineAlertComponents
()
{
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
all
.
add
(
C
(
BusinessAlertConfig
.
class
).
req
(
AlertConfigManager
.
class
));
all
.
add
(
C
(
NetworkAlertConfig
.
class
).
req
(
AlertConfigManager
.
class
));
all
.
add
(
C
(
SystemAlertConfig
.
class
).
req
(
AlertConfigManager
.
class
));
all
.
add
(
C
(
ExceptionAlertConfig
.
class
).
req
(
AlertConfigManager
.
class
));
all
.
add
(
C
(
AlertInfo
.
class
));
all
.
add
(
C
(
DefaultMailImpl
.
class
).
req
(
ServerConfigManager
.
class
));
all
.
add
(
C
(
DataChecker
.
class
,
DefaultDataChecker
.
class
));
all
.
add
(
C
(
RemoteMetricReportService
.
class
).
req
(
ServerConfigManager
.
class
));
all
.
add
(
C
(
BusinessAlert
.
class
).
req
(
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
BaselineService
.
class
,
MailSMS
.
class
,
BusinessAlertConfig
.
class
,
AlertInfo
.
class
,
AlertDao
.
class
)
//
.
req
(
RemoteMetricReportService
.
class
,
BusinessRuleConfigManager
.
class
,
DataChecker
.
class
));
all
.
add
(
C
(
NetworkAlert
.
class
).
req
(
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
BaselineService
.
class
,
MailSMS
.
class
,
NetworkAlertConfig
.
class
,
AlertInfo
.
class
,
AlertDao
.
class
)
//
.
req
(
RemoteMetricReportService
.
class
,
NetworkRuleConfigManager
.
class
,
DataChecker
.
class
));
all
.
add
(
C
(
SystemAlert
.
class
).
req
(
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
BaselineService
.
class
,
MailSMS
.
class
,
SystemAlertConfig
.
class
,
AlertInfo
.
class
,
AlertDao
.
class
)
//
.
req
(
RemoteMetricReportService
.
class
,
SystemRuleConfigManager
.
class
,
DataChecker
.
class
));
all
.
add
(
C
(
AlertExceptionBuilder
.
class
).
req
(
ExceptionConfigManager
.
class
));
all
.
add
(
C
(
ExceptionAlert
.
class
).
req
(
ProjectDao
.
class
,
ExceptionAlertConfig
.
class
,
MailSMS
.
class
,
ExceptionConfigManager
.
class
,
AlertExceptionBuilder
.
class
,
AlertDao
.
class
).
req
(
ModelService
.
class
,
TopAnalyzer
.
ID
));
return
all
;
}
private
List
<
Component
>
defineCommonComponents
()
{
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
all
.
add
(
C
(
JsonBuilder
.
class
));
...
...
@@ -98,29 +133,10 @@ public class ComponentsConfigurator extends AbstractResourceConfigurator {
all
.
add
(
C
(
StateGraphs
.
class
,
StateGraphs
.
class
).
//
req
(
ReportService
.
class
));
all
.
add
(
C
(
Module
.
class
,
CatHomeModule
.
ID
,
CatHomeModule
.
class
));
all
.
add
(
C
(
ModuleManager
.
class
,
DefaultModuleManager
.
class
)
//
.
config
(
E
(
"topLevelModules"
).
value
(
CatHomeModule
.
ID
)));
all
.
add
(
C
(
DomainNavManager
.
class
).
req
(
ProjectDao
.
class
));
all
.
add
(
C
(
EventCollectManager
.
class
).
req
(
EventDao
.
class
,
ServerConfigManager
.
class
));
all
.
add
(
C
(
TopologyGraphConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
ExceptionConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
DomainGroupConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
BugConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
MetricGroupConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
NetworkRuleConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
BusinessRuleConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
AlertConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
TopologyGraphItemBuilder
.
class
).
req
(
TopologyGraphConfigManager
.
class
));
...
...
@@ -130,36 +146,28 @@ public class ComponentsConfigurator extends AbstractResourceConfigurator {
.
req
(
ProductLineConfigManager
.
class
,
TopologyGraphDao
.
class
,
DomainNavManager
.
class
)
//
.
req
(
ModelService
.
class
,
DependencyAnalyzer
.
ID
));
all
.
add
(
C
(
ConfigReloadTask
.
class
).
req
(
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
));
all
.
add
(
C
(
IpService
.
class
));
all
.
add
(
C
(
CdnGraphCreator
.
class
).
req
(
BaselineService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
,
CachedMetricReportService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
all
.
add
(
C
(
CachedMetricReportService
.
class
,
CachedMetricReportServiceImpl
.
class
)
.
req
(
ModelService
.
class
,
MetricAnalyzer
.
ID
).
req
(
ReportService
.
class
).
req
(
IpService
.
class
));
all
.
add
(
C
(
DataExtractor
.
class
,
DataExtractorImpl
.
class
));
// update project database
all
.
add
(
C
(
ProjectUpdateTask
.
class
)
//
.
req
(
ProjectDao
.
class
,
HostinfoDao
.
class
));
all
.
add
(
C
(
MetricDataFetcher
.
class
,
MetricDataFetcherImpl
.
class
));
all
.
add
(
C
(
AlertInfo
.
class
).
req
(
MetricConfigManager
.
class
));
return
all
;
}
all
.
add
(
C
(
MetricGraphCreator
.
class
).
req
(
CachedMetricReportService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
).
req
(
BaselineService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
)
);
@Override
public
List
<
Component
>
defineComponents
()
{
List
<
Component
>
all
=
new
ArrayList
<
Component
>(
);
all
.
add
(
C
(
SystemGraphCreator
.
class
).
req
(
CachedMetricReportService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
).
req
(
BaselineService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
all
.
addAll
(
defineCommonComponents
());
all
.
addAll
(
defineConfigComponents
());
all
.
addAll
(
defineMetricComponents
());
all
.
addAll
(
defineAlertComponents
());
all
.
add
(
C
(
UserMonitorGraphCreator
.
class
,
DefaultUserMonitGraphCreator
.
class
).
req
(
CachedMetricReportService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
).
req
(
BaselineService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
all
.
add
(
C
(
Module
.
class
,
CatHomeModule
.
ID
,
CatHomeModule
.
class
));
all
.
add
(
C
(
ModuleManager
.
class
,
DefaultModuleManager
.
class
)
//
.
config
(
E
(
"topLevelModules"
).
value
(
CatHomeModule
.
ID
)
));
all
.
add
(
C
(
NetworkGraphCreator
.
class
).
req
(
CachedMetricReportService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
).
req
(
BaselineService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
// report serivce
all
.
addAll
(
new
ReportServiceComponentConfigurator
().
defineComponents
());
// task
...
...
@@ -168,52 +176,14 @@ public class ComponentsConfigurator extends AbstractResourceConfigurator {
// model service
all
.
addAll
(
new
ServiceComponentConfigurator
().
defineComponents
());
all
.
add
(
C
(
RemoteMetricReportService
.
class
).
req
(
ServerConfigManager
.
class
));
all
.
add
(
C
(
BusinessAlertConfig
.
class
).
req
(
AlertConfigManager
.
class
));
all
.
add
(
C
(
NetworkAlertConfig
.
class
).
req
(
AlertConfigManager
.
class
));
all
.
add
(
C
(
SystemAlertConfig
.
class
).
req
(
AlertConfigManager
.
class
));
all
.
add
(
C
(
ExceptionAlertConfig
.
class
).
req
(
AlertConfigManager
.
class
));
all
.
add
(
C
(
AlertInfo
.
class
));
all
.
add
(
C
(
DefaultMailImpl
.
class
).
req
(
ServerConfigManager
.
class
));
all
.
add
(
C
(
DataChecker
.
class
,
DefaultDataChecker
.
class
));
all
.
add
(
C
(
BusinessAlert
.
class
).
req
(
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
BaselineService
.
class
,
MailSMS
.
class
,
BusinessAlertConfig
.
class
,
AlertInfo
.
class
,
AlertDao
.
class
)
//
.
req
(
RemoteMetricReportService
.
class
,
BusinessRuleConfigManager
.
class
,
DataChecker
.
class
));
all
.
add
(
C
(
NetworkAlert
.
class
).
req
(
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
BaselineService
.
class
,
MailSMS
.
class
,
NetworkAlertConfig
.
class
,
AlertInfo
.
class
,
AlertDao
.
class
)
//
.
req
(
RemoteMetricReportService
.
class
,
NetworkRuleConfigManager
.
class
,
DataChecker
.
class
));
all
.
add
(
C
(
SystemAlert
.
class
).
req
(
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
BaselineService
.
class
,
MailSMS
.
class
,
SystemAlertConfig
.
class
,
AlertInfo
.
class
,
AlertDao
.
class
)
//
.
req
(
RemoteMetricReportService
.
class
,
SystemRuleConfigManager
.
class
,
DataChecker
.
class
));
all
.
add
(
C
(
AlertExceptionBuilder
.
class
).
req
(
ExceptionConfigManager
.
class
));
all
.
add
(
C
(
ExceptionAlert
.
class
).
req
(
ProjectDao
.
class
,
ExceptionAlertConfig
.
class
,
MailSMS
.
class
,
ExceptionConfigManager
.
class
,
AlertExceptionBuilder
.
class
,
AlertDao
.
class
).
req
(
ModelService
.
class
,
TopAnalyzer
.
ID
));
all
.
add
(
C
(
NetGraphConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
TableProvider
.
class
,
"app-data-command"
,
AppDataCommandTableProvider
.
class
));
// database
all
.
add
(
C
(
JdbcDataSourceDescriptorManager
.
class
)
//
.
config
(
E
(
"datasourceFile"
).
value
(
"/data/appdatas/cat/datasources.xml"
)));
all
.
addAll
(
new
CatDatabaseConfigurator
().
defineComponents
());
all
.
addAll
(
new
AppDatabaseConfigurator
().
defineComponents
());
all
.
addAll
(
new
UserDatabaseConfigurator
().
defineComponents
());
// update project database
all
.
add
(
C
(
ProjectUpdateTask
.
class
)
//
.
req
(
ProjectDao
.
class
,
HostinfoDao
.
class
));
// web, please keep it last
all
.
addAll
(
new
WebComponentConfigurator
().
defineComponents
());
...
...
@@ -222,4 +192,48 @@ public class ComponentsConfigurator extends AbstractResourceConfigurator {
return
all
;
}
private
List
<
Component
>
defineConfigComponents
(){
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
all
.
add
(
C
(
TopologyGraphConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
ExceptionConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
DomainGroupConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
BugConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
MetricGroupConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
NetworkRuleConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
BusinessRuleConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
AlertConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
NetGraphConfigManager
.
class
).
req
(
ConfigDao
.
class
));
all
.
add
(
C
(
ConfigReloadTask
.
class
).
req
(
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
));
return
all
;
}
private
List
<
Component
>
defineMetricComponents
(){
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
all
.
add
(
C
(
IpService
.
class
));
all
.
add
(
C
(
CachedMetricReportService
.
class
,
CachedMetricReportServiceImpl
.
class
)
.
req
(
ModelService
.
class
,
MetricAnalyzer
.
ID
).
req
(
ReportService
.
class
).
req
(
IpService
.
class
));
all
.
add
(
C
(
DataExtractor
.
class
,
DataExtractorImpl
.
class
));
all
.
add
(
C
(
MetricDataFetcher
.
class
,
MetricDataFetcherImpl
.
class
));
all
.
add
(
C
(
AlertInfo
.
class
).
req
(
MetricConfigManager
.
class
));
all
.
add
(
C
(
CdnGraphCreator
.
class
).
req
(
BaselineService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
,
CachedMetricReportService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
all
.
add
(
C
(
MetricGraphCreator
.
class
).
req
(
CachedMetricReportService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
).
req
(
BaselineService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
all
.
add
(
C
(
SystemGraphCreator
.
class
).
req
(
CachedMetricReportService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
).
req
(
BaselineService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
all
.
add
(
C
(
UserMonitorGraphCreator
.
class
,
DefaultUserMonitGraphCreator
.
class
).
req
(
CachedMetricReportService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
).
req
(
BaselineService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
all
.
add
(
C
(
NetworkGraphCreator
.
class
).
req
(
CachedMetricReportService
.
class
,
DataExtractor
.
class
,
MetricDataFetcher
.
class
).
req
(
BaselineService
.
class
,
MetricConfigManager
.
class
,
ProductLineConfigManager
.
class
,
MetricGroupConfigManager
.
class
,
AlertInfo
.
class
));
return
all
;
}
}
cat-home/src/main/java/com/dianping/cat/report/view/NavigationBar.java
浏览文件 @
ca4c2878
...
...
@@ -27,6 +27,8 @@ public class NavigationBar {
ReportPage
.
USERMONITOR
,
ReportPage
.
APP
,
ReportPage
.
TRANSACTION
,
ReportPage
.
EVENT
,
...
...
cat-home/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
ca4c2878
此差异已折叠。
点击以展开。
script/Cat.sql
浏览文件 @
ca4c2878
...
...
@@ -344,10 +344,10 @@ CREATE TABLE `app_data_command` (
`connnect_type`
tinyint
NOT
NULL
COMMENT
'访问类型,是否长连接'
,
`code`
smallint
NOT
NULL
COMMENT
'返回码'
,
`platform`
tinyint
NOT
NULL
COMMENT
'平台'
,
`access_number`
long
NOT
NULL
COMMENT
'访问量'
,
`response_sum_time`
long
NOT
NULL
COMMENT
'响应时间大小'
,
`request_package`
long
NOT
NULL
COMMENT
'请求包大小'
,
`response_package`
long
NOT
NULL
COMMENT
'响应包大小'
,
`access_number`
bigint
NOT
NULL
COMMENT
'访问量'
,
`response_sum_time`
bigint
NOT
NULL
COMMENT
'响应时间大小'
,
`request_package`
bigint
NOT
NULL
COMMENT
'请求包大小'
,
`response_package`
bigint
NOT
NULL
COMMENT
'响应包大小'
,
`creation_date`
datetime
NOT
NULL
COMMENT
'数据插入时间'
,
PRIMARY
KEY
(
`id`
),
KEY
IX_period_city_minute
(
period
,
city
,
minute_order
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录