Last active
January 28, 2019 17:13
-
-
Save kpettijohn/d4ee96ef7bd03c8040ffd2b952b8608c to your computer and use it in GitHub Desktop.
Testing alerts with Alertmanager
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
[ | |
{ | |
"labels": { | |
"alertname": "ServiceHighRequestLatency", | |
"region": "useast2", | |
"job": "blackbox", | |
"protocol": "https", | |
"service": "www", | |
"instance": "https://www.example.com" | |
}, | |
"annotations": { | |
"info": "Probes originating from useast2 have an average request latency above 4s (current value: TEST)", | |
"summary": "HighRequestLatency on www" | |
} | |
}, | |
{ | |
"labels": { | |
"alertname": "ServiceHighRequestLatency", | |
"region": "uswest2", | |
"job": "blackbox", | |
"protocol": "https", | |
"service": "www", | |
"instance": "https://www.example.com" | |
}, | |
"annotations": { | |
"info": "Probes originating from useast2 have an average request latency above 4s (current value: TEST)", | |
"summary": "HighRequestLatency on www" | |
} | |
} | |
] |
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
URL="http://127.0.0.1:9093" | |
alert=$(cat alert.json) | |
curl -XPOST -d"$alert" $URL/api/v1/alerts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment