[OpenNMS/opennms] b9e31b: 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: b9e31bc5d3557bf07cb1d8cfca99a3bab9feee66
      https://github.com/OpenNMS/opennms/commit/b9e31bc5d3557bf07cb1d8cfca99a3bab9feee66
  Author: Marshall Massengill <[email protected]>
  Date:   2026-08-13 (Thu, 13 Aug 2026)

  Changed paths:
    M opennms-services/src/main/java/org/opennms/netmgt/collectd/CollectableService.java
    M opennms-services/src/test/java/org/opennms/netmgt/collectd/CollectableServiceTest.java

  Log Message:
  -----------
  NMS-19979: clear data collection alarms after a restart or collectd reload

A dataCollectionFailed alarm never cleared if collection recovered across an
OpenNMS restart or a collectd configuration reload.

CollectableService keeps the last collection status in memory and updateStatus()
only emits an event on a transition. That status was seeded to SUCCEEDED, and
both a restart and rebuildScheduler() discard and rebuild every
CollectableService, so the recovery was no longer a transition, no
dataCollectionSucceeded was sent, and the alarm was orphaned.

Seed it to UNKNOWN instead. The first collection then always transitions,
whichever way it goes: a success emits dataCollectionSucceeded and clears the
alarm the previous generation left behind, and a failure emits
dataCollectionFailed exactly as before. Subsequent collections are unchanged,
so this costs one extra event per collected service per restart or reload, not
one per collection cycle.

An unmatched dataCollectionSucceeded creates a Normal severity alarm of its own,
which the default alarmd cleanUp rule deletes after five minutes.



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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.