Search code examples
windowssnmpopennms

OpenNMS fails to collect cpuPercentBusy for some windows nodes


I have an environment with 5 Windows servers (2008). I have added them to my OpenNMS instance. These servers are identical with the only difference being the app component running on them.

However, only 4 of those 5 nodes have cpuPercentBusy.jrb being collected on OpenNMS. SNMP services are running on all nodes. Also, other snmp data is being collected fine. It's just that cpuPercentBusy.jrb is not collected for one of the nodes. Is there any reason why this is not being collected for this node. The logs don't reveal any specific reason.


Solution

  • If you look in the $OPENNMS_HOME/etc/datacollection/microsoft.xml for the OID that is used to collect cpuPercentBusy you will find ".1.3.6.1.2.1.25.3.3.1.2" for the oid and instance "1". Perform an snmpget on the OID .1.3.6.1.2.1.25.3.3.1.2.1 This is typically something like -

    snmpget -v 2c -c mycommunitystring mywindowshost .1.3.6.1.2.1.25.3.3.1.2.1
    

    I will bet you will see that it fails. I saw the following when I tried it -

    Error in packet
    Reason: (noSuchName) There is no such variable name in this MIB.
    Failed object: HOST-RESOURCES-MIB::hrProcessorLoad.1
    

    I would then try a walk and you may see that there are other instances. You can perform a walk like this -

    snmpwalk -v 2c -c mycommunitystring mywindowshost .1.3.6.1.2.1.25.3.3.1.2
    

    On one of my systems the response I received was -

    HOST-RESOURCES-MIB::hrProcessorLoad.2 = INTEGER: 63
    HOST-RESOURCES-MIB::hrProcessorLoad.3 = INTEGER: 61
    

    For whatever reason on some windows system the .1 instance is not available. There is little OpenNMS can do about that. Additional information can be found here. If you walk .1.3.6.1.2.1.25.3.2.1.3 you can see that there is a table with the instance IDs that match. In my case .1 it is a "Microsoft XPS Document Writer v4".

    You might consider installing SNMP Informant to get better data.