Created
April 20, 2017 06:59
-
-
Save yangl/f1d6810388e615e077cd41aac58df978 to your computer and use it in GitHub Desktop.
bosun配置例子
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notification sdk.otps.connrate.uxin.ding60 { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327|18928495951|13736157898|18618324918|18576761242|13428967565|13428967565|18676663045|18673390570|15202240237|15118845510|15013718265&content=【有信接通率低于60%预警】有信品牌接通率低于60% | |
} | |
notification sdk.otps.connrate.uxin.mail60 { | |
email = polaris.wang@uxin.com,Dora.song@uxin.com,yang.tang@uxin.com,Andy.bian@uxin.com,tyler.liu@uxin.com,lao.cheng@uxin.com,winter.chen@uxin.com,zack.zeng@uxin.com,Vincent.Zhong@uxin.com,evan.feng@uxin.com,Joker.Li@uxin.com,Will.Jiang@uxin.com | |
} | |
template sdk.otps.connrate.uxin { | |
subject = `uxin业务预警:有信品牌连通率低于60%` | |
body = `<p><strong>uxin业务预警:有信品牌连通率低于60%</strong> | |
<hr> | |
<p> <strong>触发值:</strong> | |
<p> {{.Eval .Alert.Vars.curr}} | |
<hr> | |
<a href="http://zbx.uxin001.com:3030/dashboard/db/yuan-tong-xun-all"><strong>点击查看图表</strong> | |
<hr> | |
{{ .Graph .Alert.Vars.q}} | |
<hr>` | |
} | |
alert sdk.otps.connrate.uxin.ding60 { | |
log = true | |
maxLogFrequency = 10m | |
runEvery = 1 | |
$now = epoch() | |
template = sdk.otps.connrate.uxin | |
$q=q("sum:bigdata.sdk.otps.connrate{key=brand_1}", "60m", "") | |
$curr = last($q) | |
$numq=q("sum:bigdata.sdk.otps.otpsnum{key=brand_1}", "60m", "") | |
$num = last($numq) | |
crit = ($curr < 0.60) && !($now%(86400)/3600 >16 && $now%(86400)/3600 <22) && ($num >100) | |
critNotification = sdk.otps.connrate.uxin.ding60 | |
} | |
alert sdk.otps.connrate.uxin.mail60 { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
$now = epoch() | |
template = sdk.otps.connrate.uxin | |
$q=q("sum:bigdata.sdk.otps.connrate{key=brand_1}", "60m", "") | |
$curr = last($q) | |
$numq=q("sum:bigdata.sdk.otps.otpsnum{key=brand_1}", "60m", "") | |
$num = last($numq) | |
crit = ($curr < 0.60) && ($num >100) | |
critNotification = sdk.otps.connrate.uxin.mail60 | |
} | |
notification sdk.otps.connrate.uxin.ding80 { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327|18673390570|18676663045&content=【有信接通率80%预警】有信品牌接通率低于80% | |
} | |
alert sdk.otps.connrate.uxin.ding80 { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
$now = epoch() | |
template = sdk.otps.connrate.uxin | |
$q=q("sum:bigdata.sdk.otps.connrate{key=brand_1}", "60m", "") | |
$curr = last($q) | |
$numq=q("sum:bigdata.sdk.otps.otpsnum{key=brand_1}", "60m", "") | |
$num = last($numq) | |
crit = ($curr < 0.80) && !($now%(86400)/3600 >16 && $now%(86400)/3600 <22) && ($num >100) | |
critNotification = sdk.otps.connrate.uxin.ding80 | |
} | |
notification app.smsgateway.ding80 { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327|18813951802&content=【短信网关预警】短信网关成功率低于80% | |
} | |
template app.smsgateway.mail80 { | |
subject = `uxin业务预警:短信网关成功率低于80%` | |
body = `<p><strong>uxin业务预警:短信网关成功率低于80%</strong> | |
<hr> | |
<p> <strong>触发值:</strong> | |
<p> {{.Eval .Alert.Vars.curr}} | |
<hr> | |
<a href="http://zbx.uxin001.com:3030/dashboard/db/yuan-tong-xun-all"><strong>点击查看图表</strong> | |
<hr> | |
{{ .Graph .Alert.Vars.q}} | |
<hr>` | |
} | |
alert app.smsgateway.alert80 { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
template = app.smsgateway.mail80 | |
$q1=q("sum:bigdata.uxin.app.smsgateway{type=all}", "60m", "") | |
$curr1 = last($q1) | |
$q2=q("sum:bigdata.uxin.app.smsgateway{type=0}", "60m", "") | |
$curr2 = last($q2) | |
crit = (ungroup($curr2)/ungroup($curr1) < 0.80) && (ungroup($curr1) >10) | |
critNotification = app.smsgateway.ding80 | |
} | |
notification sdk.otps.brand57.bingfa.ding { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327&content=【58招聘商机号并发告警】58招聘商机号并发下降50% | |
} | |
notification sdk.otps.brand57.jietong.ding { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327&content=【58招聘商机号接通告警】58招聘商机号接通率低于80% | |
} | |
notification sdk.otps.brand57.yingda.ding { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327&content=【58招聘商机号应答告警】58招聘商机号应答率低于30% | |
} | |
template sdk.otps.brand57 { | |
subject = `58招聘商机号告警` | |
body = `<p><strong>uxin业务预警:58招聘商机号告警</strong> | |
<hr> | |
<p> <strong>触发值:</strong> | |
<p> {{.Eval .Alert.Vars.curr}} | |
<hr> | |
<a href="http://zbx.uxin001.com:3030/dashboard/db/yuan-tong-xun-all"><strong>点击查看图表</strong> | |
<hr> | |
{{ .Graph .Alert.Vars.q}} | |
<hr>` | |
} | |
alert sdk.otps.brand57.bingfa { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
$now = epoch() | |
template = sdk.otps.brand57 | |
$diff=diff(q("sum:bigdata.sdk.otps.otpsnum{key=brand_57}", "2m", "")) | |
$first=first(q("sum:bigdata.sdk.otps.otpsnum{key=brand_57}", "2m", "")) | |
$rate=$diff/$first | |
crit =$now%(86400)/3600 >=0 && $now%(86400)/3600 <=11 && ($rate < -0.50) | |
critNotification = sdk.otps.brand57.bingfa.ding | |
} | |
alert sdk.otps.brand57.jietong { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
$now = epoch() | |
template = sdk.otps.brand57 | |
$last=last(q("sum:bigdata.sdk.otps.connrate{key=brand_57}", "10m", "")) | |
crit = $now%(86400)/3600 >=0 && $now%(86400)/3600 <=11 && ($last < 0.80) | |
critNotification = sdk.otps.brand57.jietong.ding | |
} | |
alert sdk.otps.brand57.yingda { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
$now = epoch() | |
template = sdk.otps.brand57 | |
$last=last(q("sum:bigdata.sdk.otps.ansrate{key=brand_57}", "10m", "")) | |
crit = $now%(86400)/3600 >=0 && $now%(86400)/3600 <=11 && ($last < 0.30) | |
critNotification = sdk.otps.brand57.yingda.ding | |
} | |
template uxin.sum.pay { | |
subject = `uxin收入预警` | |
body = `<p><strong>uxin收入预警</strong> | |
<hr> | |
<p> <strong>触发值:</strong> | |
<p> {{.Eval .Alert.Vars.curr}} | |
<hr> | |
<a href="http://zbx.uxin001.com:3030/dashboard/db/you-xin-dian-hua-shou-ru-jian-kong"><strong>点击查看图表</strong> | |
<hr> | |
{{ .Graph .Alert.Vars.q}} | |
<hr>` | |
} | |
notification uxin.sum.pay.times.alipay { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327|18813951802&content=【Uxin收入监控】支付宝渠道成功数次为0 | |
} | |
notification uxin.sum.pay.times.h5 { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327|18813951802&content=【Uxin收入监控】H5渠道成功数次为0 | |
} | |
notification uxin.sum.pay.times.weixin { | |
get = http://192.168.0.3:5000/ding?secret=fskd2endprx&phone=13751744327|18813951802&content=【Uxin收入监控】微信渠道成功数次为0 | |
} | |
alert uxin.sum.pay.times.alipay { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
template = uxin.sum.pay | |
$s=sum(q("sum:bigdata.app.monitor.sumpay.times{key=alipay_*order}", "60m","")) | |
crit = $s < 1 | |
critNotification = uxin.sum.pay.times.alipay | |
} | |
alert uxin.sum.pay.times.h5 { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
template = uxin.sum.pay | |
$s=sum(q("sum:bigdata.app.monitor.sumpay.times{key=iapppay_*order}", "60m","")) | |
crit = $s < 1 | |
critNotification = uxin.sum.pay.times.h5 | |
} | |
alert uxin.sum.pay.times.weixin { | |
log = true | |
maxLogFrequency = 30m | |
runEvery = 1 | |
template = uxin.sum.pay | |
$s=sum(q("sum:bigdata.app.monitor.sumpay.times{key=weixinpay_*order}", "60m","")) | |
crit = $s < 1 | |
critNotification = uxin.sum.pay.times.weixin | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment