atom feed14 messages in net.java.dev.opendmk.usersstarting a standalone snmp agent
FromSent OnAttachments
Lucio CruscaFeb 10, 2011 9:03 am 
Daniel FuchsFeb 10, 2011 9:22 am 
Lucio CruscaFeb 11, 2011 6:49 am 
Daniel FuchsFeb 11, 2011 7:04 am 
Lucio CruscaFeb 11, 2011 8:20 am 
Lucio CruscaFeb 15, 2011 8:48 am 
Daniel FuchsFeb 20, 2011 6:10 am 
Lucio CruscaFeb 21, 2011 8:17 am 
Daniel FuchsFeb 21, 2011 9:28 am 
Lucio CruscaFeb 22, 2011 7:02 am 
Daniel FuchsFeb 22, 2011 9:07 am 
Lucio CruscaMar 31, 2011 9:17 am 
Daniel FuchsMar 31, 2011 9:39 am 
Daniel FuchsMar 31, 2011 9:53 am 
Subject:starting a standalone snmp agent
From:Lucio Crusca (luc@sulweb.org)
Date:Feb 10, 2011 9:03:47 am
List:net.java.dev.opendmk.users

Hi,

I'm making some progress with my snmp server (agent) simulator... btw now I've quite clear what a snmp manager is (the client!).

Following the JDMK tutorial [1], I'm trying to code a standalone SNMP agent, and here is the relevant snippet:

SnmpAdaptorServer snmpserv = new SnmpAdaptorServer(port, addr);

snmpserv.start();

// Send a coldStart SNMP Trap snmpserv.setTrapPort(new Integer(port+1)); snmpserv.snmpV1Trap(0, 0, null);

SURFBEAM_SYSTEM_MIB snmpMib = new SURFBEAM_SYSTEM_MIB(); snmpMib.init(); snmpserv.addMib(snmpMib); snmpMib.setSnmpAdaptor(snmpserv);

...

protected void initSurfBeamSystem(MBeanServer server) throws Exception { final String oid = getGroupOid("SurfBeamSystem", "1.3.6.1.4.1.8698.1000.1");

where SURFBEAM_SYSTEM_MIB is the name of the class generated with mibgen.

When I run this code the agent start listening on the specified port. However if I try to query it with snmpget (from linux command line), I get:

$ snmpget -v1 -c public 10.0.0.239:5161 1.3.6.1.4.1.8698.1000.1 Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: iso.3.6.1.4.1.8698.1000.1

and if I try to use version 2c I get:

$ snmpget -v2c -c public 10.0.0.239:5162 1.3.6.1.4.1.8698.1000.1 iso.3.6.1.4.1.8698.1000.1 = No Such Instance currently exists at this OID

What am I doing wrong?

Thanks in advance, Lucio.

[1]. http://java.sun.com/products/jdmk/docs/JDMK51TUTOR.pdf