[SNMP4J] Querying by variable name vs. numeric OID

Frank Fock fock at agentpp.com
Fri Apr 4 00:12:12 CEST 2008


Hi Jeff,

You need a MIB compiler or at least a name
to OID mapping to do this at runtime. The
latter can be generated at compile time
with AgenPro or MIB Explorer
(http://www.agentpp.com).

To use MIB information, you can use JASMI
(see http://www.mibdesigner.com) or any
other Java MIB compiler.

Best regards,
Frank

Jeff Pople wrote:
> I am aiming to provide a very simple web control
> interface to a device, using SNMP4J behind the scenes.
>   I have a prototype running which essentially uses
> the SNMPRequest class and I can sucessfully issue GETs
> and SETs to the device.
> 
> Now, if I use 'snmptrap' from the command line, I can
> issue GETs by variable name (e.g sysName.0) but with
> SNMPRequest, I have to use the numeric OID (e.g. 
> 1.3.6.1.2.1.1.5.0) - the label name fails a validation
> check as non-numeric.
> 
> I am sure there is an easy way to do this with SNMP4J
> but it escapes me. Can anyone help or even provide an
> example? 
> 
> Regards
> 
> Jeff
> 
> 
> 
>       ____________________________________________________________________________________
> You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
> http://tc.deals.yahoo.com/tc/blockbuster/text5.com
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



More information about the SNMP4J mailing list