Fixed
Details
Assignee
Jeff GehlbachJeff GehlbachReporter
Jeff GehlbachJeff GehlbachLabels
Components
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Jeff Gehlbach
Jeff GehlbachReporter
Jeff Gehlbach
Jeff GehlbachLabels
Components
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created May 30, 2017 at 4:16 PM
Updated November 2, 2017 at 7:08 PM
Resolved November 2, 2017 at 7:08 PM
Steps to reproduce on a freshly installed system:
1) Set the
collectd
appender toDEBUG
orINFO
inlog4j2.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 theifIndex
of the interface targeted by this policy. On the system I'm using, it's4
.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.