Modify foreign source in HeartbeatConsumer to ignore docker interfaces and detect SNMP agent
Description
Acceptance / Success Criteria
policy to ignore docker interfaces is in place
detector to reliable detect SNMP agent on Minion (127.0.0.1) itself
policy and detector are added when they are not present
Attachments
- 16 Nov 2022, 05:53 PM
- 16 Nov 2022, 05:44 PM
- 16 Nov 2022, 05:44 PM
- 16 Nov 2022, 05:44 PM
Lucidchart Diagrams
Activity
Alberto December 7, 2022 at 6:17 PM
Merged to release-31
Chantal Moffatt November 16, 2022 at 5:59 PMEdited
Reopening as the implementation does not work as intended.
Thanks to @Chandra Gorantla for his help in troubleshooting and confirming the issue.
Minion Appliance with an SNMP v2c agent and community string of public (for testing/integration purpose)
Test #1
https://opennms.atlassian.net/browse/HZN-31#icft=HZN-31 new vanilla installation (i.e. only embedded ActiveMQ enable so I can connect a Minion).
Looking at Minion node: snmp-detector listed under 127.0.0.1 as not monitored (See HZN31vanilla.png screenshot)
Test #2
https://opennms.atlassian.net/browse/HZN-31#icft=HZN-31 updated poller-configuration.xml as per Chandra's suggestion adding the service and snmp-detector under the Minion package
<monitor service="snmp-detector" class-name="org.opennms.netmgt.poller.monitors.SnmpMonitor"/>
<service name="snmp-detector" interval="300000" user-defined="false" status="on">
<parameter key="oid" value=".1.3.6.1.2.1.1.2.0"/>
</service>
I got further. snmp-detector is reported as green showing 100.000%
However, I do not have any of the additional interfaces listed.
Test #3
https://opennms.atlassian.net/browse/HZN-31#icft=HZN-31 with the above, edited the Minion requisition definition. Renamed snmp-detector to SNMP.
Now the other interfaces are listed with SNMP.
Under the definition, there is now SNMP and snmp-detector.
There are now 2 snmp-policy ...
Test #4
The snmp-policy to exclude docker interface did take effect.
172.17.0.1 is listed as an IP interface
docker0 is not listed as an SNMP interface.
@Chandra Gorantla recommended that snmp-detector be replaced with SNMP so everything works out of the box.
Test #5
Click Resource graph.
There are no graphs related to the appliance core (ex: Node-level Performance Data, SNMP Interface Data for the local interface).
After editing the Minion interface 127.0.0.1 to be a SNMP Primary interface (P instead of N), I got data.
Alberto October 27, 2022 at 9:36 PM
Merged to release 31
Details
Assignee
AlbertoAlbertoReporter
Christian PapeChristian PapeStory Points
7Sprint
NoneFix versions
Affects versions
Priority
Minor
Details
Details
Assignee
Reporter
Story Points
Sprint
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

In order to monitor an appliance it is necessary to bind the SNMP service to a Minion when it is discovered. In the class HeartbeatConsumer the requisition and the foreign source are created for discovered minions. Here we must now add:
add SNMP detector definition to foreign source
add DO_NOT_PERSIST policy for ignoring docker0..dockerN interfaces to foreign source
Of course, this must also be checked for upgraded installations where the requisition/foreign source already exist but the detector and policy is not present.