Skip to content

Commit

Permalink
chore(runtime): add new runtime type 'CPU alert'
Browse files Browse the repository at this point in the history
  • Loading branch information
bindeliu authored and bdliu(刘彬德) committed Jul 27, 2018
1 parent b633d26 commit 040fe54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/proxy/http.proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ function afterCpu80(cpuUsed) {
mail.SendMail(key, 'js', 600, {
'to': config.mailTo,
'cc': config.mailCC,
'runtimeType':'CPU',
'msgInfo': `${business.module}[CPU]${serverInfo.intranetIp}单核CPU${serverInfo.cpu}使用率为:${cpuUsed},超过80%`,
'title': `${business.module}[CPU]${serverInfo.intranetIp}单核CPU${serverInfo.cpu}使用率为:${cpuUsed},超过80%`,
'content': content,
Expand Down
2 changes: 2 additions & 0 deletions bin/tsw/api/keyman/runtimeType.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"Css404" : "内联CSS不存在",
"LargeJs" : "内联JS过大",
"Js404" : "内联JS不存在",
"CPU" : "CPU告警",
"hello" : "hello"

}

0 comments on commit 040fe54

Please sign in to comment.