Created
December 9, 2018 21:16
-
-
Save regel/917533a566ebc2d8989c3d5d2f935235 to your computer and use it in GitHub Desktop.
TICK script section triggering alerts to PagerDuty
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
var pos = data | |
|changeDetect('is_anomaly') | |
|alert() | |
.warn(lambda: "is_anomaly" == TRUE) | |
.crit(lambda: "is_anomaly" == TRUE AND "score" > 90.0) | |
.message('{{if ne .Level "OK" }} Hey, unexpected situation detected score={{ index .Fields "score" | printf "%0.3f" }} {{else}} Back to normal {{end}}') | |
.pagerDuty2() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment