I am writing a script to retrive info via SNMP (which I am new to). I am able to start the session without errors but when I try to get information on a specific oid, I get a
noSuchName(2) error. Here's the basis of my code:
my ($remote_snmp_session,$error);
($remote_snmp_session,$error) = Net::SNMP->session(Hostname=>"localhos
+t",Community=>"public");
my ($value,$result);
my $oid = "1.3.6.1.4.1.314.50.1.20.3.50.1";
##here's the problem##
$result = $remote_snmp_session->get_request($iod) || die "Problem:$!",
+ $remote_snmp_session->error;
I have used another utility called snmpget with the same hostname, community, and oid. It works successfully.
I've looked through as much documentation as I can get my hands on, but I think I'm missing something very fundimental here. Anyone care to enlighten me?
many thanks.