diff --git a/plugins/other/snmp__cpu_usage b/plugins/other/snmp__cpu_usage index 7d0f3db0..54d34542 100755 --- a/plugins/other/snmp__cpu_usage +++ b/plugins/other/snmp__cpu_usage @@ -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)) {