benjojo / alertmanager-discord

Take your alertmanager alerts, into discord
Apache License 2.0
176 stars 80 forks source link

Is there a health check endpoint or a function test? #21

Open skiwheelr opened 3 years ago

skiwheelr commented 3 years ago

I need some way to test if this is relaying the message to discord. Would the following prometheus call work?

{ "version": "4", "groupKey": "keygroup", "status": "firing", "receiver": "receiver1", "groupLabels": null, "commonLabels": null, "commonAnnotations": null, "externalURL": "am", "alerts": [ { "status": "firing", "labels": null, "annotations": null, "startsAt": "", "endsAt": "", "generatorURL": "url" }, ] }

Right now it returns an empty response body, so i have no idea if this is working.

benjojo commented 3 years ago

What are you looking for in your health check? that the service can handle HTTP requests, or that it can reach discord?

I can think of some quirky way to test both, but I'm interested in what is useful to you