[SNMP4J] creating own agent
Eugene R. Snider
gene at cvtt.net
Sat Nov 17 17:29:14 CET 2007
That depends on what the intended purpose of the SNMP interface is.
Assuming that you have a management and monitoring interface of some
sort then the agent need be little more a NOC line status monitoring tool.
I recently finished an agent that was not dissimilar. In that case the
customer wanted to integrate the remote monitoring devices with the
centralized NOC. The solution we arrived at was, in fact, a MIB. However
the implementation of the agent delivered only the ifTable which
provided the ifIndex, ifDesc and a tny number of other fields. The
monitoring devices sent a UDP event stream to the agent which populated
the ifTable and threw traps which represented the monitor events but
there was no device specific tables, indices or other cumbersome managed
objects.
The customer end user was very pleased, the event notifications
contained the essential information to be communicated to the NOC team
and the ifIndex/ifTable managed objects were easily integrated into
their existing OpenView deployment.
This sound counter-intuitive until one remembers that an SNMP agent is a
brain damaged pawn of the remote manager and need only provide the level
of information that can be reasonably expected of an 80's era router.
Trust me, if you throw the traps and keep the ifIndex, ifDesc,
ifAdminStatus and ifOperStatus fields current you have provided the NOC
with all the information they need to manage and monitor your network.
The mib and mib handlers themselves were very simple containing only
the objects which were associated with the trap using
accessible_for_notify and a few textual conventions. I bound the
appropriate elements from the data stream, threw the trap(s) and I was done.
To create the mib I took the example ifMIB and deleted everything that
wasn't related to linkUp/linkDown traps and built up from there.
Also I would recommend that your initial MIB be located off the
experimental branch so you can abandon it when you do the second
generation...
Not to detract from SNMP4j but I can recommend the Unleashed SNMP tools
(I have no affiliation with them) for trap monitoring and mib walking.
Gene
Martin Fischer wrote:
> We are working on wireless sensor networks with motes and want to
> transmit sensor data over SNMP. It would make sense to create our own
> MIB, wouldn't it?
>
> Eugene R. Snider schrieb:
>
>> My first suggestion is to determine if you really need your own MIB or
>> if one of the existing MIBs will fill your needs. Most people spend a
>> great deal of unecessary time and effort creating enterprise specific
>> SNMP implementations when they don't need too.
>>
>> Gene
>>
>> Martin Fischer wrote:
>>
>>> Hi there,
>>> I'm pretty new to SNMP4J so please be patient ;)
>>>
>>> We want to create our own agent. So we took the TestAgent and used the
>>> static table of the createStaticIfTable() method. We put all our data in
>>> that table and they showed up in the interface table of our NMS.
>>>
>>> So far so good but now we want to change the position of our data in the
>>> OID tree. They should not show up under interfaces.
>>>
>>> What is the easiest way to do that? Do we have to write our own
>>> xyzMib.java like the IfMib.java and register it?
>>>
>>> Any suggestions are welcome!
>>>
>>> Regards
>>> 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