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 unset
Proposal
- Add
resolved-priority (int, optional) to the ntfy Config, matching Pushover's field name (resolved-priority / ResolvedPriority).
- When set, valid range is 1–5, same as
priority; 0 means 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-level provider-override keep working.
buildRequestBody(): when resolved == true, send resolved-priority if set, otherwise fall back to priority.
- Apply the fallback after overrides are merged, so an override that only sets
priority also affects resolved messages when resolved-priority was 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.
Summary
The ntfy provider uses a single
priorityfor both triggered and resolved messages:buildRequestBodyinalerting/provider/ntfy/ntfy.goalways sendscfg.Priority. Pushover supports a separateresolved-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 settingsend-on-resolved: falseand getting no recovery notification at all.Proposed configuration
Proposal
resolved-priority(int, optional) to the ntfyConfig, matching Pushover's field name (resolved-priority/ResolvedPriority).priority;0means unset.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.priorityalso affects resolved messages whenresolved-prioritywas never set.Alternatives
The
customprovider 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.