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:
parent
2d5c78a463
commit
f00e552b55
1 changed files with 8 additions and 6 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue