Created
May 4, 2016 13:30
-
-
Save markuskont/71b0dff64b4087261c379b71e4897306 to your computer and use it in GitHub Desktop.
Babbys first TICK script.
This file contains hidden or 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
var warn_threshold = 30 | |
var crit_threshold = 10 | |
var data = stream | |
.from().measurement('cpu') | |
.where(lambda: "cpu" == 'cpu-total') | |
.groupBy('host') | |
// Do normal alerting | |
data.alert() | |
.warn(lambda: "usage_idle" < warn_threshold) | |
.crit(lambda: "usage_idle" < crit_threshold) | |
// Log alerts | |
.log('/var/log/kapacitor/alerts.json') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment