Skip to content

Instantly share code, notes, and snippets.

@ctdk
Created December 7, 2015 19:45
Show Gist options
  • Save ctdk/e7220c64ef72299feaeb to your computer and use it in GitHub Desktop.
Save ctdk/e7220c64ef72299feaeb to your computer and use it in GitHub Desktop.
lookup load_host {
entry host=cassandra* {
highCrit = 10
highWarn = 8
}
entry host=mariadb* {
highCrit = 8
highWarn = 6
}
entry host=* {
highCrit = 1
highWarn = 0
}
}
alert load {
template = generic
$metric = collectd.*.*.*.load.load.longterm
$query = aliasByNode(perSecond($metric),3)
$graphData = graphite("movingAverage($query,40)", "20m", "", "host")
$val = avg(graphite("$query","5m", "","host"))
warn = $val > lookup("load_host", "highWarn")
crit = $val > lookup("load_host", "highCrit")
critNotification = critNot
warnNotification = default
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment