Is there a simple way/module to map snmp(MIB) strings to OIDs in Perl?
E.g. I start with "sysUpTime.0" and get "1.3.6.1.2.1.1.3.0". As far as I can see, Net::SNMP expects you to have them already mapped.
Is there a simple way/module to map snmp(MIB) strings to OIDs in Perl?
E.g. I start with "sysUpTime.0" and get "1.3.6.1.2.1.1.3.0". As far as I can see, Net::SNMP expects you to have them already mapped.
You can use NetSNMP::OID to do the conversion.
use NetSNMP::OID;
my $oid = NetSNMP::OID->new('sysUpTime.0');
NetSNMP::OID is part of the Net-SNMP project, not to be confused with the Net::SNMP module.