[OpenNMS/opennms] 3da932: NMS-20113: Replace the Slack and Mattermost notifi...
Marshall Massengill via opennms-cvs <[email protected]>
| 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: 3da932f8bf3e7e86d3ba1630e7a5c8757e7465af
https://github.com/OpenNMS/opennms/commit/3da932f8bf3e7e86d3ba1630e7a5c8757e7465af
Author: Marshall Massengill <[email protected]>
Date: 2026-08-07 (Fri, 07 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: 0d606679365c7df9afae187c560db6881a36f74b
https://github.com/OpenNMS/opennms/commit/0d606679365c7df9afae187c560db6881a36f74b
Author: Marshall Massengill <[email protected]>
Date: 2026-08-07 (Fri, 07 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: 57113e339bdfe2ceadd7bb39c16e657118f7aa00
https://github.com/OpenNMS/opennms/commit/57113e339bdfe2ceadd7bb39c16e657118f7aa00
Author: Marshall Massengill <[email protected]>
Date: 2026-08-07 (Fri, 07 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]>
Commit: 2d34c21c6a954b2b2e31e3778d2f0fe87b572133
https://github.com/OpenNMS/opennms/commit/2d34c21c6a954b2b2e31e3778d2f0fe87b572133
Author: Marshall Massengill <[email protected]>
Date: 2026-08-07 (Fri, 07 Aug 2026)
Changed paths:
M docs/modules/operation/pages/deep-dive/notifications/strategies/webhook.adoc
Log Message:
-----------
NMS-20113: Fix three escaped tokens in the webhook documentation
AsciiDoc honors a backslash escape before a brace only when the braces
hold a valid attribute name, so ${...}, ${customBlocks|raw} and
${scv:...} kept their backslash and rendered as $\{...} on the page.
None of the three needs escaping, because none of them parses as an
attribute reference in the first place.
Compare: https://github.com/OpenNMS/opennms/compare/01b7ada9ecc5...2d34c21c6a95
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