[SNMP4J] own agent with own mib
Eugene R. Snider
gene at cvtt.net
Wed Dec 5 16:21:29 CET 2007
I would like to point out that the OID 1.3.6.1.3.1.1 is already defined
in the a fair number of deployed private and enterprise MIBs It seems
to me you might want to consider moving your MIB onto the experimental
branch using a higher base OID to avoid conflicts with other
experimental mibs which might be installed at your end user site.
Maybe something like 1.3.1.3.2732.1, I generally try to pick a random
prime number between 2000-3000
Gene
Martin Fischer wrote:
> 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
>>>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
>
More information about the SNMP4J
mailing list