Created
December 5, 2018 18:03
-
-
Save regel/61d034a55accbda08d01901dacbefa72 to your computer and use it in GitHub Desktop.
TICK-1 section 3
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 | |
// the next node counts abnormal data points | |
|stateCount(lambda: "is_anomaly" == TRUE) | |
|alert() | |
// Warn after 1 point | |
.warn(lambda: "state_count" >= 1) | |
// Critical after 5 points and abnormal higher than 90 / 100 | |
.crit(lambda: "state_count" >= 5 AND "score" > 90.0) | |
.message('{{ .Time }}: Hey, unexpected situation detected by model={{ index .Fields "model" }} state=ongoing score={{ index .Fields "score" | printf "%0.3f" }}.') | |
.slack() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment