Nodes provisioned via provision.pl don't graph until OpenNMS is restarted
Description
Environment
Acceptance / Success Criteria
Attachments
Lucidchart Diagrams
Activity

Jorel Van Os June 26, 2014 at 8:43 AM
This worked for me. Thank you for your assistance.

Alejandro Galue June 26, 2014 at 8:33 AM
You have an error on your procedure, you must specify the snmp-primary flag, otherwise Collectd is not going to start collecting data, I mean:
./usr/share/opennms/bin/provision.pl node add Provisioning-Group Node-Name4 Node-Label4
./usr/share/opennms/bin/provision.pl interface add Provisioning-Group Node-Name4 10.1.1.4
./usr/share/opennms/bin/provision.pl interface set Provisioning-Group Node-Name4 10.1.1.4 snmp-primary P
./usr/share/opennms/bin/provision.pl service add Provisioning-Group Node-Name4 10.1.1.4 SNMP
./usr/share/opennms/bin/provision.pl requisition import Provisioning-Group

Jorel Van Os June 19, 2014 at 2:43 PM
I am using the default collectd-configuration.xml and all other files. My most recent testing was on a completely clean install of OpenNMS 1.12.8. My community string was already working prior to provisioning the node. However, re-sending the nodeGainedService event for SNMP as you suggested did work. The only change I made to any configuration is I changed snmp-config.xml so the default v2 SNMP community string is my default string instead of "public".
$ sudo cat /etc/opennms/snmp-config.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<snmp-config version="v2c" read-community="CommunityString" timeout="1800" retry="1" xmlns="http://xmlns.opennms.org/xsd/config/snmp">
</snmp-config>
Then I provisioned another node like this:
./usr/share/opennms/bin/provision.pl node add Provisioning-Group Node-Name4 Node-Label4
./usr/share/opennms/bin/provision.pl interface add Provisioning-Group Node-Name4 10.1.1.4
./usr/share/opennms/bin/provision.pl service add Provisioning-Group Node-Name4 10.1.1.4 SNMP
./usr/share/opennms/bin/provision.pl requisition import Provisioning-Group
OpenNMS immediately picked up the node and SNMP attributes again, but the SNMP graphs didn't work until I sent the nodeGainedService event for SNMP. How should I change/re-arrange my commands so that Collectd schedules data collection?

Alejandro Galue June 19, 2014 at 12:03 PM
Are you using the default collectd-configuration.xml ?
Is it correct to assume that the SNMP settings configured in OpenNMS are correct before provisioning the node ? By correct I mean, use provision.pl to get the SNMP credentials and then use /opt/opennms/bin/snmp-request (not Net-SNMP's snmpwalk) with those settings.
If you're not sure, try re-sending the nodeGainedService event for SNMP, for example, if the node's ID is 10 and the IP is 10.0.0.1 do this:
/opt/opennms/bin/send-event.pl -n 10 -i 10.0.0.1 -s SNMP uei.opennms.org/nodes/nodeGainedService
When Collectd receives this event, it will schedule (or re-schedule) data collection for the node in question.
Once again, SNMP must be fully operational before deploying the node, because Collectd needs to find the enterprise OID on the node's table before try to schedule data collection (that's why resending the event helps, if you forgot to verify the SNMP settings).
Details
Assignee
UnassignedUnassignedReporter
Jorel Van OsJorel Van OsComponents
Affects versions
Priority
Minor
Details
Details
Assignee
Reporter

Components
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

Please see the following thread: http://opennms.530661.n2.nabble.com/Nodes-don-t-graph-when-provisioned-via-provision-pl-until-OpenNMS-is-restarted-td7586705.html
When I provision a circuit via provision.pl, the SNMP attributes and SNMP interfaces get picked up just fine, but under Resource Graphs no SNMP graphs are produced until OpenNMS is restarted. Hitting the Rescan and SNMP Update buttons does not help. I have reproduced this issue with dozens of different nodes from multiple vendors on three separate Ubuntu OpenNMS installations. Most recently, I reproduced this same issue on a completely clean OpenNMS 1.12.8 install. I provisioned two different circuits using the following commands (only the IP address and community strings are changed for privacy reasons):
./usr/share/opennms/bin/provision.pl node add Provisioning-Group Node-Name Node-Label
./usr/share/opennms/bin/provision.pl interface add Provisioning-Group Node-Name 10.1.1.1
./usr/share/opennms/bin/provision.pl snmp set 10.1.1.1 CommunityString version=2c
./usr/share/opennms/bin/provision.pl service add Provisioning-Group Node-Name 10.1.1.1 SNMP
./usr/share/opennms/bin/provision.pl requisition import Provisioning-Group
./usr/share/opennms/bin/provision.pl snmp set 10.1.1.2 CommunityString version=2c
./usr/share/opennms/bin/provision.pl node add Provisioning-Group Node-Name2 Node-Label2
./usr/share/opennms/bin/provision.pl interface add Provisioning-Group Node-Name2 10.1.1.2
./usr/share/opennms/bin/provision.pl service add Provisioning-Group Node-Name2 10.1.1.2 SNMP
./usr/share/opennms/bin/provision.pl requisition import Provisioning-Group
Again, the SNMP interfaces and attributes showed up just fine but under Resource Graphs no SNMP graphs showed up. I then provisioned a third node using the Add Node button in the OpenNMS web GUI, and it immediately began producing SNMP graphs. After restarting OpenNMS, the first two circuits provisioned via provision.pl started producing SNMP graphs.
It appears something is being missed when circuits are being provisioned using provision.pl but not when using Add Node, and this missing process is only being picked up when OpenNMS is restarted.