[SNMP4J] SNMP help
Frank Fock
fock at agentpp.com
Fri Aug 17 15:37:29 CEST 2007
Hi Brian,
Bryan Sevilla wrote:
> Hi,
>
> I need to provide SNMP support for the project I'm working on such that
> I can send out snmp trap to the network monitoring software for a
> certain events of the application. Our application actually process smtp
> messages, and what we're looking at to be monitored was that when our
> system receives an inbound mail, we would like to notify the network
> monitoring software that a message was received and if it has been
> process successfully or not. We would like also to monitor server
> timeouts, those were the servers the application is connecting to, e.g.
> DB host. I have read info from on the net about SNMP, MIB's but I still
> don't know how I could start coding. Here are some of the questions that
> bug me:
>
> SNMP and MIB's are closely related, yet I don't know how could I create
> an MIB? How could I identify the MIB's I will need? Do I need also to
>
To create a MIB, a text editor is enough, although a tool like my
MIB Designer (http://www.mibdesigner.com) can save you many
hours particularly if you are new to SMI (SNMP).
You can write a single MIB for your product or divide it into
several MIB specifications which cover separated aspects of
the product. Of course, you should use standard MIBs where
appropriate.
> provide mib for snmp trap? How could I map an mib text file to java
>
Yes, even if you only want to send a trap, you will need a MIB for that,
because that's the contract between sender and receiver. From the
technical point of view, a MIB file is not necessary though.
> class in the context of snmp4j? Do I really need to create an Agent to
> send a snmp trap? What are the classes I need to create a snmp trap?
>
You should create an agent although that is not necessary. Sending only
traps is not a good design. For more details, search for "trap directed
polling"
concept in the SNMP FAQ.
>
> Right now, I've already downloaded snmp4j and tried running the
> TestAgent and was able to perform get/walk/set snmp operation on that
> agent using an MIB browser.
>
> Can someone lead me to the right direction on how could I start the
> development using snmp4j?
>
Download AgenPro and read the included instrumentation HowTo PDF.
That should explain the basic ideas. Additionally, you will need to
read the SNMP RFCs or a good book on SNMP (there are few,
but "Understanding SNMP MIB's" is one of those few).
Best regards,
Frank
More information about the SNMP4J
mailing list