Created
August 15, 2019 19:32
-
-
Save dhiren051/115de1b5b986739c44ac6bd568e69a0d 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
#!/bin/bash | |
alerts='[ | |
{ | |
"labels": { | |
"alertname": "instance_down", | |
"instance": "example1" | |
}, | |
"annotations": { | |
"info": "The instance example1 is down", | |
"summary": "instance example1 is down" | |
} | |
} | |
]' | |
URL="https://alertmanager.mydomain.com" | |
curl -XPOST -d"$alerts" $URL/api/v1/alerts | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment