Created
October 31, 2019 18:58
-
-
Save armiiller/486a65274f9059f09e4a5854e1256cd7 to your computer and use it in GitHub Desktop.
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
... | |
// will look at windows of data so you are not spammed by every datapoint | |
|window() | |
.period(period) | |
.every(period) | |
... | |
// send the alert to PagerTree with different levels. Only report state changes. | |
|alert() | |
.info(lambda: "value" > info) | |
.warn(lambda: "value" > warn) | |
.crit(lambda: "value" > crit) | |
.stateChangesOnly() // *very important* | |
.message('{{.ID}} is {{.Level}} value: {{ index .Fields "value" }}') | |
.id('high_cpu') | |
.idTag('alertID') | |
.levelTag('level') | |
.messageField('message') | |
.post(pagertree_url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment