[SNMP4J] SNMP help
Bryan Sevilla
Bryan.Sevilla at headstrong.com
Tue Aug 21 13:39:36 CEST 2007
Thanks Frank for your response.
BTW, we had switch on using JMX for our application monitoring
requirements to simplify development and due to lack of time, but we
know at the end of the road the product will still need to support SNMP
communication.
And for now, we'll just set aside temporarily SNMP and focus on learning
JMX. On general terms regardless of underlying protocol, can you pls.
give us some advice on some design consideration for application
management?
-----Original Message-----
From: Frank Fock [mailto:fock at agentpp.com]
Sent: Friday, August 17, 2007 9:37 PM
To: Bryan Sevilla
Cc: snmp4j at agentpp.org; Lorenzo Dee
Subject: Re: [SNMP4J] SNMP help
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