Andreea Bogdana Botez
2007-04-16 08:40:16 UTC
Hi.
I'm trying to use the python module for netsnmp with a new MIB (not one the
standard ones) and a new snmp agent that knows how to interact with it.
Standard tests work ok, for example:
snmpset -v 2c -c private 127.1:8333 SOME-MIB::<oid>.0 i 5
SOME-MIB::<oid>.0 = INTEGER: 5
Also, the standard snmp module tests (test.py) against snmpd with the given
conf file are ok.
But, when I try to do the same think using the python module:
sess = netsnmp.Session(Version=2, DestHost='localhost',
Community='public')
sess.UseEnums = 1
sess.UseLongNames = 1
vars = netsnmp.VarList(netsnmp.Varbind(<oid>,'0'))
vals = sess.get(vars)
I get an "get: unknown object ID (<oid>)v2 sess.get result: None" error.
If I change vars = netsnmp.VarList(netsnmp.Varbind(<numeric_oid>,'0')) -
then I get a None object in vals.
Probably there's something that I didn't do right..
I'm using net-snmp version 5.4 on a Linux RH 2.6.16.7 platform.
Thanks for helping
Bogdana
I'm trying to use the python module for netsnmp with a new MIB (not one the
standard ones) and a new snmp agent that knows how to interact with it.
Standard tests work ok, for example:
snmpset -v 2c -c private 127.1:8333 SOME-MIB::<oid>.0 i 5
SOME-MIB::<oid>.0 = INTEGER: 5
Also, the standard snmp module tests (test.py) against snmpd with the given
conf file are ok.
But, when I try to do the same think using the python module:
sess = netsnmp.Session(Version=2, DestHost='localhost',
Community='public')
sess.UseEnums = 1
sess.UseLongNames = 1
vars = netsnmp.VarList(netsnmp.Varbind(<oid>,'0'))
vals = sess.get(vars)
I get an "get: unknown object ID (<oid>)v2 sess.get result: None" error.
If I change vars = netsnmp.VarList(netsnmp.Varbind(<numeric_oid>,'0')) -
then I get a None object in vals.
Probably there's something that I didn't do right..
I'm using net-snmp version 5.4 on a Linux RH 2.6.16.7 platform.
Thanks for helping
Bogdana