Can I specify MIB::ObjectValue using the Perl SNMP module?

I can use the CLI tool to specify MIB plus Object Value:

host> snmpget -c public test-switch POWER-ETHERNET-MIB::pethMainPsePower.1
POWER-ETHERNET-MIB::pethMainPsePower.1 =3D Gauge32: 370 Watts

But I run into a pothole when I try the same using the Perl module:

[...]
$val =3D $session->get('POWER-ETHERNET-MIB::pethMainPsePower.1');
say $session->{ErrorStr};
[...]]
Unknown Object Identifier



Capturing frames using dumpcap, I see that the CLI tool puts a query for th=
e following on the wire:
.1.3.6.1.2.1.105.1.3.1.1.2.1

host> snmptranslate .1.3.6.1.2.1.105.1.3.1.1.2.1
POWER-ETHERNET-MIB::pethMainPsePower.1


While the SNMP tool puts a query for this on the wire:
.1.3.6.1.4.1.9.5.1.2.16.0
host> snmptranslate .1.3.6.1.4.1.9.5.1.2.16.0
CISCO-STACK-MIB::chassisModel.0

[I want both ALU-POWER-ETHERNET-MIB and POWER-ETHERNET-MIB to coexist in my=
 MIB collection ... and both specify a pethMainPsePower.1 variable ... ergo=
 my efforts in this regard.]

--sk

Stuart Kendrick
Allen Institute

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to