1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 09:57:09 +00:00

v1 used Net::SNMP module, and hard coded snmp v2c. This v2 version uses Munin::Plugin::SNMP which transparently supports all snmp versions.

This commit is contained in:
Tom Feiner 2011-02-23 14:14:39 +01:00 committed by Steve Schnepp
parent 2d5c78a463
commit f00e552b55

View file

@ -125,12 +125,14 @@ my %cpuCounters = (
cpuIdle => "1.3.6.1.4.1.2021.11.11.$cpu", # The percentage of processor time spent idle, calculated over the last minute
);
my ($session, $error) = Net::SNMP->session(
-hostname => $host,
-community => $community,
-port => $port,
-version => "2c"
);
my $session = Munin::Plugin::SNMP->session(-translate =>
[ -timeticks => 0x0 ]);
if (!defined ($session))
{
die "Croaking: could not establish SNMP object";
}
if (!defined ($session))
{