Tuesday, October 25, 2016

Prometheus: creating and deleting silences

the following can be used to create, delete and get silence items from a prometheus server.

get all silences (including expired ones) curl http://localhost:9093/api/v1/silences

delete a specific silence - curl http://localhost:9093/api/v1/silence/6b61b918-4aa3-4c8e-b0bf-985ff334c598 -XDELETE

create a silence - curl http://localhost:9093/api/v1/silences -XPOST {"matchers":[{"name":"c","value":"c"}],"createdBy":"ami@rounds.com","startsAt":"2016-10-25T14:03:00.000Z","endsAt":"2016-10-25T18:03:00.000Z","comment":"c"}