[Bug 851625] [NEW] snmp__if plugin does not work

tome 851625 at bugs.launchpad.net
Fri Sep 16 06:50:23 UTC 2011


Public bug reported:

The plugin actually supports 32 bit counter as well as 64 bit counter.
However, if the snmp server you are connecting to does not support 64
bit byte counters, snmp__if fails.

When I tried to the snmp server which supports only 32 bit counter, the plugin returned as follows:
#munin-run snmp_hostname_if_1
recv.value noSuchObject
send.value noSuchObject

Here is an example of problems I found in the code.

# from line 244
if (defined ($response = $session->get_single($ifEntryIn64Octets) ||
	                 $session->get_single($ifEntryInOctets))) {
    print "recv.value ", $response, "\n";
}

In these lines, "$session->get_single($ifEntryIn64Octets" is supposed to
return undefined value if the server doesn't support 64 bit counter.
However, it actually returns "noSuchObject".

So, these lines should be fixed like this:

if (defined($response = $session->get_single($ifEntryIn64Octets))){
	if ($response eq 'noSuchObject'){
		# 64 bit counter is not supported
		$response = $session->get_single($ifEntryInOctets);
	}
} else {
	# No response
	$response = 'U';
}
print "recv.value ", $response, "\n";


# The information about my environment

Description:    Ubuntu 10.04.3 LTS
Release:        10.04

munin-node:
  Installed: 1.4.4-1ubuntu1
  Candidate: 1.4.4-1ubuntu1
  Version table:
 *** 1.4.4-1ubuntu1 0

** Affects: munin (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to munin in Ubuntu.
https://bugs.launchpad.net/bugs/851625

Title:
  snmp__if plugin does not work

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/munin/+bug/851625/+subscriptions



More information about the Ubuntu-server-bugs mailing list