Alertmanager Silence API - how to expire an active silence through API

41 views
Skip to first unread message

Velmurugan C

unread,
Jul 9, 2020, 1:48:54 AM7/9/20
to Prometheus Users
Dear All,

I have created the silence in my alertmanager through CURL command with below details

curl http://<alertManager>:9093/api/v1/silences -d '{
      "matchers": [
        {
          "name": "<NAME>",
          "value": "<VALUE>",
          "isRegex": true
        }
      ],
      "startsAt": "'"$startTime"'",
      "endsAt": "'"$endTime"'",
      "createdBy": "api",
      "comment": "Silence",
      "status": {
        "state": "active"
      }

}'


Could some one help me to expire an active silence through API as like above ?

Note: I expect  way to do this without amtool



Thanks.....

l.mi...@gmail.com

unread,
Jul 9, 2020, 3:03:45 AM7/9/20
to Prometheus Users
You need to find the ID of the silence in the UI or from the API, then send a DELETE request:
curl -XDELETE http://<alertManager>:9093/api/v2/silence/$ID
Reply all
Reply to author
Forward
0 new messages