Skip to content

Instantly share code, notes, and snippets.

@dhiren051
Created August 15, 2019 19:32
Show Gist options
  • Save dhiren051/115de1b5b986739c44ac6bd568e69a0d to your computer and use it in GitHub Desktop.
Save dhiren051/115de1b5b986739c44ac6bd568e69a0d to your computer and use it in GitHub Desktop.
#!/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