|
I'm trying to get SNMP data from APC device and I have problem with it.
I can get info via net-snmp without problems.
monitor-server:~# snmpget -v 3 -n "" -u "username" -a MD5 -A "password" -l authNoPriv device.my.net SNMP-FRAMEWORK-MIB::snmpEngineTime.0
But when I try to use perl Net::SNMP it gives error during session initialization.
I have simple script:
#!/usr/bin/perl
use strict;
use Net::SNMP;
my ($session, $error) = Net::SNMP->session(
-hostname => 'device.my.net',
-version => 'snmpv3',
-username => 'username',
-authpassword => 'password',
-authprotocol => 'md5'
);
if (!defined($session)) {
printf("ERROR: %s.\n", $error);
exit 1;
}
I get: "ERROR: Time synchronization failed during discovery." instead of session.
The simple script works with linux snmpd but not with the APC device.
I can provide debug output if needed.
I know it's related to usmStatsNotInTimeWindows, engineBoots and engineTime. But I don't have time to dig thru RFCs.
The server is debian lenny with libnet-snmp-perl 5.2.0-1 package.
Any ideas how to fix it?
|