TwiN / gatus

⛑ Automated developer-oriented status page
https://gatus.io
Apache License 2.0
6.43k stars 428 forks source link

Allow setting a priority on resolved Pushover notifications #767

Open onedr0p opened 6 months ago

onedr0p commented 6 months ago

Describe the feature request

It would be nice if I could set a separate priority for when alerts are resolved using Pushover.

Ideally I want alerts when triggered to be 1 (which is possible now) and when resolved 0 (not currently possible).

This is how Prometheus and Alertmanager currently operate for pushover for me:

priority: '{{ if eq .Status "firing" }}1{{ else }}0{{ end }}'

I would be over the moon if gatus could do something like that too.

Why do you personally want this feature to be implemented?

This would help cut down on alerting fatigue since some people might only be interested in getting alerted on problems at a higher priority and alerted on a lower priority when resolved.

How long have you been using this project?

18 months

Additional information

No response

onedr0p commented 6 months ago

@TwiN I would like to try and implement this but before I get started I am curious if you would be fine with the following config? The way alerting.pushover.priority-on-resolved would work is that it wouldn't be a breaking change to those using pushover already.

Configuring Pushover alerts

Parameter Description Default
alerting.pushover Configuration for alerts of type pushover {}
alerting.pushover.application-token Pushover application token ""
alerting.pushover.user-key User or group key ""
alerting.pushover.title Fixed title for all messages sent via Pushover Name of your App in Pushover
alerting.pushover.priority Priority of all messages, ranging from -2 (very low) to 2 (emergency) 0
alerting.pushover.priority-on-resolved Override the priority of messages on resolved, ranging from -2 (very low) to 2 (emergency) alerting.pushover.priority
alerting.pushover.sound Sound of all messages
See sounds for all valid choices.
""
alerting.pushover.default-alert Default alert configuration.
See Setting a default alert
N/A
Marck commented 4 months ago

I am glad I Googled and found this question, I also would like this very much. It seems there isn't a PR for it (yet). @onedr0p care to create a PR for it? Otherwise I could give a go at writing go

onedr0p commented 4 months ago

Hi @Marck feel free to give it a try, I was waiting on feedback from @TwiN to go ahead but I probably won't have time to circle back on this for another few months.

TwiN commented 4 months ago

@onedr0p I completely missed the notification!

Yeah, your suggestion looks perfect to me.

@Marck Feel free to ping me if you have any questions!