[OpenNMS/opennms] 049508: NMS-19979: clear data collection alarms after a re...
Marshall Massengill via opennms-cvs <[email protected]>
| Newsgroups | gmane.network.opennms.cvs |
|---|---|
| Message-ID | <OpenNMS/opennms/push/refs/heads/mm/NMS-19979-smoke/[email protected]> |
Branch: refs/heads/mm/NMS-19979-smoke
Home: https://github.com/OpenNMS/opennms
Commit: 0495083516d74a0f7f097c2ebce3b86b864cfd3a
https://github.com/OpenNMS/opennms/commit/0495083516d74a0f7f097c2ebce3b86b864cfd3a
Author: Marshall Massengill <[email protected]>
Date: 2026-08-10 (Mon, 10 Aug 2026)
Changed paths:
M opennms-services/src/main/java/org/opennms/netmgt/collectd/CollectableService.java
M opennms-services/src/main/java/org/opennms/netmgt/collectd/Collectd.java
M opennms-services/src/test/java/org/opennms/netmgt/collectd/CollectableServiceTest.java
M opennms-services/src/test/java/org/opennms/netmgt/collectd/CollectdExternalIT.java
M opennms-services/src/test/java/org/opennms/netmgt/collectd/CollectdIT.java
M opennms-services/src/test/java/org/opennms/netmgt/collectd/CollectdMoreIT.java
A opennms-services/src/test/java/org/opennms/netmgt/collectd/CollectdOutstandingFailuresIT.java
M opennms-services/src/test/java/org/opennms/netmgt/collectd/DuplicatePrimaryAddressIT.java
M opennms-services/src/test/java/org/opennms/netmgt/collectd/ThresholdIT.java
Log Message:
-----------
NMS-19979: clear data collection alarms after a restart or collectd reload
CollectableService tracks the last collection status in memory and seeds it
to SUCCEEDED, and updateStatus() only emits an event on a transition. Both a
restart and a collectd configuration reload (rebuildScheduler) discard and
rebuild every CollectableService, so a service that was failing comes back as
SUCCEEDED, its recovery is no longer a transition, no dataCollectionSucceeded
is sent, and the alarm never clears.
Seed the status from the alarms the previous generation raised, the way
pollerd seeds PollStatus from open outages in Poller.scheduleServices(). The
alarms are matched on node, interface and service rather than on the reduction
key, so this still works where the key has been customized in eventconf, and
the query runs once per scheduling pass rather than once per service.
Initializing the status to UNKNOWN so that the first collection always emits
would be simpler, but AlarmPersisterImpl creates an alarm when a resolution
event matches no problem alarm, so every reload would leave behind one Normal
dataCollectionSucceeded alarm per collected service.
A service that is still failing after a restart no longer re-emits
dataCollectionFailed either, so it stops inflating the alarm counter.
Alarms belonging to a service that collectd will never visit again, because
the interface left the package or the collector was uninstalled, are out of
scope and still have to be cleared by hand.
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