[OpenNMS/opennms] f4f4e3: NMS-20113: Replace the Slack and Mattermost notifi...
Marshall Massengill via opennms-cvs <[email protected]> Mon, 03 Aug 2026 10:37:21 -0700
| Newsgroups | gmane.network.opennms.cvs |
|---|---|
| Message-ID | <OpenNMS/opennms/push/refs/heads/mm/NMS-20113-smoke/[email protected]> |
Branch: refs/heads/mm/NMS-20113-smoke
Home: https://github.com/OpenNMS/opennms
Commit: f4f4e3d58bd03996dc260c649b6fe4dfc7e35848
https://github.com/OpenNMS/opennms/commit/f4f4e3d58bd03996dc260c649b6fe4dfc7e35848
Author: Marshall Massengill <[email protected]>
Date: 2026-08-03 (Mon, 03 Aug 2026)
Changed paths:
M docs/modules/operation/nav.adoc
M docs/modules/operation/pages/deep-dive/notifications/bonus-strategies.adoc
M docs/modules/operation/pages/deep-dive/notifications/introduction.adoc
R docs/modules/operation/pages/deep-dive/notifications/strategies/mattermost.adoc
R docs/modules/operation/pages/deep-dive/notifications/strategies/slack.adoc
A docs/modules/operation/pages/deep-dive/notifications/strategies/webhook.adoc
M docs/modules/operation/pages/quick-start/beyond-qs.adoc
M docs/modules/releasenotes/pages/changelog.adoc
M docs/modules/releasenotes/pages/whatsnew.adoc
M opennms-services/pom.xml
R opennms-services/src/main/java/org/opennms/netmgt/notifd/AbstractSlackCompatibleNotificationStrategy.java
R opennms-services/src/main/java/org/opennms/netmgt/notifd/MattermostNotificationStrategy.java
R opennms-services/src/main/java/org/opennms/netmgt/notifd/SlackNotificationStrategy.java
A opennms-services/src/main/java/org/opennms/netmgt/notifd/WebhookNotificationStrategy.java
R opennms-services/src/test/java/org/opennms/netmgt/notifd/MattermostNotificationStrategyIT.java
R opennms-services/src/test/java/org/opennms/netmgt/notifd/MattermostNotificationStrategyTestServlet.java
R opennms-services/src/test/java/org/opennms/netmgt/notifd/SlackCompatibleNotificationStrategyTest.java
R opennms-services/src/test/java/org/opennms/netmgt/notifd/SlackNotificationStrategyIT.java
A opennms-services/src/test/java/org/opennms/netmgt/notifd/WebhookNotificationStrategyIT.java
A opennms-services/src/test/java/org/opennms/netmgt/notifd/WebhookNotificationStrategyTest.java
A opennms-services/src/test/java/org/opennms/netmgt/notifd/WebhookNotificationStrategyTestServlet.java
R opennms-services/src/test/resources/MattermostNotificationStrategyTest/WEB-INF/web.xml
A opennms-services/src/test/resources/WebhookNotificationStrategyTest/WEB-INF/web.xml
Log Message:
-----------
NMS-20113: Replace the Slack and Mattermost notification channels with a generic webhook
The Slack and Mattermost strategies shared a base class that built one
hardcoded JSON shape, so no other receiver could be expressed, and it
treated only a literal "ok" response body as success, which meant a
receiver answering 204 with no body was always logged as failed.
Adds WebhookNotificationStrategy, which takes the URL, method, content
type, headers, and body template from the notification command. Values
substituted into a JSON body are escaped, with a |raw modifier for
fragments that are themselves JSON, and the rendered body is parsed
before it is sent so a template mistake is reported locally instead of
as an opaque 400. Any 2xx counts as success, narrowed by an optional
-success-match for receivers that report failure behind a 200.
Template tokens deliberately exclude colons so they cannot collide with
the metadata DSL, which notifd resolves against notification parameters
before the command runs.
Removes the two strategies, their shared base class, and their tests,
and replaces the two documentation pages with a single webhook page
carrying Slack, Mattermost, Microsoft Teams, Discord, and non-chat
examples plus a migration table.
Commit: c68ed771947180b6384f7e1ca48760f619193535
https://github.com/OpenNMS/opennms/commit/c68ed771947180b6384f7e1ca48760f619193535
Author: Marshall Massengill <[email protected]>
Date: 2026-08-03 (Mon, 03 Aug 2026)
Changed paths:
M docs/modules/operation/pages/deep-dive/notifications/strategies/webhook.adoc
M opennms-services/src/main/java/org/opennms/netmgt/notifd/WebhookNotificationStrategy.java
M opennms-services/src/test/java/org/opennms/netmgt/notifd/WebhookNotificationStrategyTest.java
Log Message:
-----------
NMS-20113: Review fixes for the webhook notification strategy
Log only the scheme and host of the webhook URL. Slack, Discord and
Teams URLs carry their credential in the path or query, so the previous
error log wrote a secret to notifd.log on any connection failure.
Reject blank bodies and trailing content when validating a JSON payload.
ObjectMapper.readTree maps blank input to a MissingNode and stops at the
first value, so {"text": "x"} oops was passing the check the strategy
advertises and failing at the receiver instead.
Also warn on an unknown template modifier rather than emitting the token
verbatim, ignore a negative timeout, and document that substitution
applies to the body alone and that a header must be declared as an
argument for its system property to take effect.
Commit: 7ca5894c4da2978992a707681dc8fae045d98b32
https://github.com/OpenNMS/opennms/commit/7ca5894c4da2978992a707681dc8fae045d98b32
Author: Marshall Massengill <[email protected]>
Date: 2026-08-03 (Mon, 03 Aug 2026)
Changed paths:
M docs/modules/operation/pages/deep-dive/notifications/introduction.adoc
M opennms-services/src/main/java/org/opennms/netmgt/notifd/WebhookNotificationStrategy.java
Log Message:
-----------
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Compare: https://github.com/OpenNMS/opennms/compare/3b3ed9fd7dd7...7ca5894c4da2
To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs