Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9388

INFO-level "unable to locate resource" log messages for interfaces not persisted by policy

    Details

      Description

      Steps to reproduce on a freshly installed system:

      1) Set the collectd appender to DEBUG or INFO in log4j2.xml
      2) Edit default foreign-source definition, adding a Match SNMP Interface policy with action = DO_NOT_PERSIST and parameters that will match one interface on a node to be added. For example, key: ifDescr / value: eth1.
      3) Use snmpwalk or a similar utility to determine the ifIndex of the interface targeted by this policy. On the system I'm using, it's 4.
      4) Add node to system

      Expected result: No log messages about data collected for the unpersisted interface, maybe?

      Actual result: Lots of INFO-level messages indicating unable to locate resource for the unpersisted interface (instance id 4):

      2017-05-30 19:53:55,481 INFO  [DefaultUDPTransportMapping_0.0.0.0/0] o.o.n.c.SnmpCollectionSet: Unable to locate resource for agent Agent[nodeid = 1 ipaddr= 192.168.33.1] with instance id 4 while collecting attribute ifSpeed [.1.3.6.1.2.1.2.2.1.5]
      2017-05-30 19:53:55,482 INFO  [DefaultUDPTransportMapping_0.0.0.0/0] o.o.n.c.SnmpCollectionSet: Unable to locate resource for agent Agent[nodeid = 1 ipaddr= 192.168.33.1] with instance id 4 while collecting attribute ifInOctets [.1.3.6.1.2.1.2.2.1.10]
      2017-05-30 19:53:55,482 INFO  [DefaultUDPTransportMapping_0.0.0.0/0] o.o.n.c.SnmpCollectionSet: Unable to locate resource for agent Agent[nodeid = 1 ipaddr= 192.168.33.1] with instance id 4 while collecting attribute ifInUcastpkts [.1.3.6.1.2.1.2.2.1.11]
      2017-05-30 19:53:55,482 INFO  [DefaultUDPTransportMapping_0.0.0.0/0] o.o.n.c.SnmpCollectionSet: Unable to locate resource for agent Agent[nodeid = 1 ipaddr= 192.168.33.1] with instance id 4 while collecting attribute ifInDiscards [.1.3.6.1.2.1.2.2.1.13]
      

      TBH I'm not sure there's anything inappropriate about logging these messages, because there's no way Collectd could (or even should) be aware of interfaces whose existence Provisiond has disavowed at the user's direction. The design of the SNMP collector makes it impossible to avoid getting the disavowed interfaces' data from the agent. Maybe the "fix" is to special-case the log message for resources of type ifIndex, adding a note that this behavior may be completely expected if DO_NOT_PERSIST policies are in use.

        Attachments

          Activity

            People

            • Assignee:
              jeffg Jeff Gehlbach
              Reporter:
              jeffg Jeff Gehlbach
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: