Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
e61a2c1d
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,发现更多精彩内容 >>
提交
e61a2c1d
编写于
5月 26, 2014
作者:
J
jialinsun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
resolve merge
上级
fb30e0b9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
7 deletion
+13
-7
cat-consumer-advanced/src/main/java/com/dianping/cat/consumer/metric/ProductLineConfigManager.java
...ianping/cat/consumer/metric/ProductLineConfigManager.java
+2
-2
cat-home/src/main/java/com/dianping/cat/report/task/exceptionAlert/ExceptionAlert.java
...anping/cat/report/task/exceptionAlert/ExceptionAlert.java
+7
-4
cat-home/src/main/java/com/dianping/cat/system/page/config/Handler.java
...ain/java/com/dianping/cat/system/page/config/Handler.java
+4
-1
未找到文件。
cat-consumer-advanced/src/main/java/com/dianping/cat/consumer/metric/ProductLineConfigManager.java
浏览文件 @
e61a2c1d
...
...
@@ -133,9 +133,9 @@ public class ProductLineConfigManager implements Initializable, LogEnabled {
if
(
"broker-service"
.
equals
(
domain
))
{
userMonitor
=
true
;
}
else
if
(
line
.
startsWith
(
NETWORK_MONITOR_PREFIX
))
{
}
else
if
(
line
.
toLowerCase
().
startsWith
(
NETWORK_MONITOR_PREFIX
))
{
networkMonitor
=
true
;
}
else
if
(
line
.
startsWith
(
SYSTEM_MONITOR_PREFIX
))
{
}
else
if
(
line
.
toLowerCase
().
startsWith
(
SYSTEM_MONITOR_PREFIX
))
{
systemMonitor
=
true
;
}
productLine
.
setNetworkDashboard
(
networkMonitor
);
...
...
cat-home/src/main/java/com/dianping/cat/report/task/exceptionAlert/ExceptionAlert.java
浏览文件 @
e61a2c1d
...
...
@@ -66,7 +66,7 @@ public class ExceptionAlert implements Task, LogEnabled {
private
TopMetric
buildTopMetric
(
Date
date
)
{
TopReport
topReport
=
queryTopReport
(
date
);
TopMetric
topMetric
=
new
TopMetric
(
ALERT_PERIOD
,
Integer
.
MAX_VALUE
,
m_configManager
);
topMetric
.
setStart
(
date
).
setEnd
(
new
Date
(
date
.
getTime
()
+
TimeUtil
.
ONE_MINUTE
));
topMetric
.
visitTopReport
(
topReport
);
return
topMetric
;
...
...
@@ -209,7 +209,7 @@ public class ExceptionAlert implements Task, LogEnabled {
List
<
String
>
emails
=
m_alertConfig
.
buildMailReceivers
(
project
);
StringBuilder
title
=
new
StringBuilder
();
title
.
append
(
"[异常告警] [项目组: "
).
append
(
domain
).
append
(
"]
[时间: "
).
append
(
new
Date
()).
append
(
"]
"
);
title
.
append
(
"[异常告警] [项目组: "
).
append
(
domain
).
append
(
"]"
);
List
<
String
>
errorExceptions
=
new
ArrayList
<
String
>();
List
<
String
>
warnExceptions
=
new
ArrayList
<
String
>();
...
...
@@ -220,10 +220,13 @@ public class ExceptionAlert implements Task, LogEnabled {
errorExceptions
.
add
(
exception
.
getName
());
}
}
String
mailContent
=
"[异常警告] ["
+
domain
+
"] : "
+
exceptions
.
toString
();
StringBuilder
mailContent
=
new
StringBuilder
();
mailContent
.
append
(
"[异常警告] ["
).
append
(
domain
).
append
(
exceptions
.
toString
());
mailContent
.
append
(
"[时间: "
).
append
(
new
Date
()).
append
(
"]"
);
m_logger
.
info
(
title
+
" "
+
mailContent
+
" "
+
emails
);
m_mailSms
.
sendEmail
(
title
.
toString
(),
mailContent
,
emails
);
m_mailSms
.
sendEmail
(
title
.
toString
(),
mailContent
.
toString
()
,
emails
);
Cat
.
logEvent
(
"ExceptionAlert"
,
project
.
getDomain
(),
Event
.
SUCCESS
,
title
+
" "
+
mailContent
);
}
...
...
cat-home/src/main/java/com/dianping/cat/system/page/config/Handler.java
浏览文件 @
e61a2c1d
...
...
@@ -468,7 +468,8 @@ public class Handler implements PageHandler<Context> {
private
List
<
String
>
queryDoaminList
()
{
List
<
String
>
result
=
new
ArrayList
<
String
>();
List
<
Project
>
projects
=
queryAllProjects
();
result
.
add
(
"Default"
);
for
(
Project
p
:
projects
)
{
result
.
add
(
p
.
getDomain
());
}
...
...
@@ -481,6 +482,8 @@ public class Handler implements PageHandler<Context> {
Date
end
=
new
Date
(
start
.
getTime
()
+
TimeUtil
.
ONE_HOUR
);
BugReport
report
=
m_reportService
.
queryBugReport
(
Constants
.
CAT
,
start
,
end
);
Set
<
String
>
exceptions
=
new
HashSet
<
String
>();
exceptions
.
add
(
"Total"
);
for
(
Entry
<
String
,
com
.
dianping
.
cat
.
home
.
bug
.
entity
.
Domain
>
domain
:
report
.
getDomains
().
entrySet
())
{
exceptions
.
addAll
(
domain
.
getValue
().
getExceptionItems
().
keySet
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录