Allow setting a different priority for resolved ntfy notifications
Summary
The ntfy provider uses a single priority for both triggered and resolved messages: buildRequestBody in alerting/provider/ntfy/ntfy.go always sends cfg.Priority. Pushover supports a separate resolved-priority (#879, requested in #767); the same would be useful for ntfy.
Use case: a critical endpoint wants priority: 5 (max) when it fails, but the resolved message should be quiet (e.g. priority: 3) instead of bypassing DND a second time. Today the choices are repeating the trigger priority on resolve or setting send-on-resolved: false and getting no recovery notification at all.
Proposed configuration
alerting:
ntfy:
url: "https://ntfy.sh"
topic: "..."
priority: 5 # triggered
resolved-priority: 3 # resolved; defaults to `priority` when unsetProposal
- Add
resolved-priority(int, optional) to the ntfyConfig, matching Pushover's field name (resolved-priority/ResolvedPriority). - When set, valid range is 1–5, same as
priority;0means unset. - When unset, resolved messages use
priority(not the provider default of 3), which keeps existing configs backward compatible. Merge(): apply a non-zero override like the other fields, so group overrides and alert-levelprovider-overridekeep working.buildRequestBody(): whenresolved == true, sendresolved-priorityif set, otherwise fall back topriority.- Apply the fallback after overrides are merged, so an override that only sets
priorityalso affects resolved messages whenresolved-prioritywas never set.
Alternatives
The custom provider can express this today with the [ALERT_TRIGGERED_OR_RESOLVED] placeholder, but that requires hand-rolling the ntfy JSON payload instead of using the native provider.
Happy to open a PR if the approach looks right.
Source: TwiN/gatus