[SNMP4J] own agent with own mib

Martin Fischer fischerm at it.uts.edu.au
Wed Dec 5 00:44:15 CET 2007



Frank Fock schrieb:
> Hi Martin,
> 
> Have you checked
> 
> (a) that xyzMib.registerMOs(server,null); gets actually called

Yes, it gets called and I get the following message:
551 [AWT-EventQueue-0] INFO org.snmp4j.agent.DefaultMOServer  -
Registered MO
org.snmp4j.agent.mo.MOScalar[oid=1.3.6.1.3.1.1.0,access=org.snmp4j.agent.mo.MOAccessImpl at 1837697,value=0.0.0.0,volatile=false]
in default context with scope
org.snmp4j.agent.mo.MOScalar[oid=1.3.6.1.3.1.1.0,access=org.snmp4j.agent.mo.MOAccessImpl at 1837697,value=0.0.0.0,volatile=false]
I think that looks fine, doesn't it?

> (b) that the OID of the scalar is in the MIB view of the user
> (community) you are using to access the agent?

We added
vacm.addViewTreeFamily(new OctetString("testReadView"), new OID(
		"1.3.6.1.3"), new OctetString(), VacmMIB.vacmViewIncluded,
		StorageType.nonVolatile);

to the addViews method. The OID of serverIP is 1.3.6.1.3.1.1.0. Is that
sufficient?

Martin

> 
> Best regards,
> Frank
> 
> Martin Fischer wrote:
>> Hi,
>> we want to implement our own SNMP agent with our own mib. So we took the
>> AgenPro tool and created a mib class from our mib file. The testagent
>> registers the mib with
>> xyzMib.registerMOs(server,null);
>> I think this is working fine to that point. How can we actually change
>> the data of the scalars?
>> E.g. we have a MOScalar called serverIP. How can we set or change this
>> IP address?
>> We created a method setServerIp that just does
>> serverIp.setValue(ipAddress);
>>
>> But when we check the OID of the serverIP with a MIB browser, we just
>> get the message "No such object"
>> Is there something else we have to do?
>>
>> Cheers
>> Martin
>> _______________________________________________
>> SNMP4J mailing list
>> SNMP4J at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
> 



More information about the SNMP4J mailing list