You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working in a plugin #1049 I found what looks like a bug in the Perl library Net::SNMP that makes that no error is thrown when trying to reach an inaccessible OID, when using SNMPv2c.
You can find detailed information in the bug report.
munin-node-configure is capable of populate the available plugins for an snmp host.
In order to do that it launch the plugin with the snmpconf parameter and the plugin return as many lines as required OIDs with the following structure:
require {OID} [{filter}]
The the word 'require'.
The OID.
An optional parameter a filter in the form of an regular expression.
Then that OIDs are queried and if the filter parameter was set, the output is checked against that regular expression, if not if the OID is inaccessible the SNMP library throws an 'noSuchName(2)' error and that plugin is not suggested.
But the combination of the snmp sessions options (translate=0) and using an SNMPv2c device (version = "v2c" ) has an unexpected result.
The bug of the Net::SNMP library makes that no error is thrown and the response is defined but equal to an empty string, so here you have no way of knowing if the OID has answered an empty string or that OID is not available.
That makes that the plugin being suggested for any snmp device using SNMP v2c regardless of the OID being accessible or not.
Until the bug in the perl library is solved the workaround (already used in many snmp plugins) is use the filter parameter to check that the value returned is not empty using something like print "require $OID ^\\d\n"; instead of print "require $OID\n";
The text was updated successfully, but these errors were encountered:
While working in a plugin #1049 I found what looks like a bug in the Perl library Net::SNMP that makes that no error is thrown when trying to reach an inaccessible OID, when using SNMPv2c.
You can find detailed information in the bug report.
munin-node-configure is capable of populate the available plugins for an snmp host.
In order to do that it launch the plugin with the
snmpconf
parameter and the plugin return as many lines as required OIDs with the following structure:require {OID} [{filter}]
Then that OIDs are queried and if the filter parameter was set, the output is checked against that regular expression, if not if the OID is inaccessible the SNMP library throws an 'noSuchName(2)' error and that plugin is not suggested.
But the combination of the snmp sessions options (translate=0) and using an SNMPv2c device (version = "v2c" ) has an unexpected result.
The bug of the Net::SNMP library makes that no error is thrown and the response is defined but equal to an empty string, so here you have no way of knowing if the OID has answered an empty string or that OID is not available.
That makes that the plugin being suggested for any snmp device using SNMP v2c regardless of the OID being accessible or not.
Until the bug in the perl library is solved the workaround (already used in many snmp plugins) is use the filter parameter to check that the value returned is not empty using something like
print "require $OID ^\\d\n";
instead ofprint "require $OID\n";
The text was updated successfully, but these errors were encountered: