Skip to content

Instantly share code, notes, and snippets.

@maddyblue
Created February 6, 2014 20:01
Show Gist options
  • Save maddyblue/8851518 to your computer and use it in GitHub Desktop.
Save maddyblue/8851518 to your computer and use it in GitHub Desktop.
tsdbHost = ny-devtsdb04.ds.stackexchange.com:4242
smtpHost = ny-mail03.ds.stackexchange.com:25
[template.cpu]
body = `Alert definition:
Name: {{.Alert.Name}}
Crit: {{.Alert.Crit}}
Tags:{{range $k, $v := .Tags}}
{{$k}}: {{$v}}{{end}}
`
subject = {{.Alert.Name}}: high cpu on {{.Tags.host}}
[alert.cpu]
notification = default
template = cpu
$q = avg(q("avg:proc.stat.cpu{host=*}", "5m"))
crit = $q > 6e7
warn = $q > 4e7
$SRE = http://chat.meta.stackoverflow.com/feeds/rooms/318?key=KEY
# HTTP Posts to chat, emails in 10 mins of not acknewledged
[notification.default]
post = $SRE
next = wakeup
timeout = 10m
$pagerduty = whoever@stackoverflow.com
[notifications.wakeup]
email = $pagerduty
next = email
timeout = 1d
$sysadmins = mjibson@stackoverflow.com, kyle@stackoverflow.com
# emails every 24h until acknowledged
[notification.email]
email = $sysadmins
next = email
timeout = 1d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment