0

I am new to SNMP4J. I have a requirement to monitor how much bandwith our web application is using. Web application is developed using Spring, Hibernate. I have downloaded SNMP4J libraries and done basic examples of finding system description, systemUp time. Please help in finding a way to complete this task.

Thanks in advance

Raju Rudru
  • 1,102
  • 12
  • 19

2 Answers2

0

Your question seems to indicate that you are not very familiar with the way SNMP supervision works. Let me try to straighten it out. Chapter 2.1 of RFC 1905 provides a more formal definition of the terms I'll use: http://www.ietf.org/rfc/rfc1905.txt

SNMP4j is a library which allows you to more easily write SNMP applications in Java. An SNMP application is either a Manager, which supervises an Agent, or it can be an Agent. It sounds like you are looking to implement an SNMP Manager.

Before you can use an SNMP Manager to monitor your Spring application, or the machine on which it is running, an SNMP Agent must be installed on the machine. Whether or not this is the case is not evident from your question, but a quick google search indicates that the "SNMP for Spring" application may be used as such an Agent. You can check the "Getting Started" page here for a quick start. http://spring-snmp.sourceforge.net/

Now, once you have an Agent, how to supervise it is more of an open question. You could get right to work at implementing your own SNMP Manager, and SNMP4j might well be the right tool for the job if you're a Java programmer. However, I would really advise against diving right into that problem. If your organization needs to supervise services on a network, look into the multitude of commercial and free network management tools that are available. I believe that the Open Source systems Nagios, ZenOSS and OpenNMS all provide SNMP monitoring capabilities in their free implementations.

If you implement your own threshold-based bandwidth monitoring system, you might later be tempted to expand it to handle more than just your Spring system, and add trap reception, and .... and in the end you will have reinvented (most of) the figurative wheel (by which I mean an NMS system) which might not do the job quite as well as one of the aforementioned products.

Jolta
  • 2,620
  • 1
  • 29
  • 42
-1

Your web application should be installed in some machine, and so that you can find the bandwith of your machine using snmp4j.hope it is what you want.

snow8261
  • 939
  • 2
  • 14
  • 34
  • If I could, I would vote down this answer for being really unhelpful. – Jolta Jan 15 '13 at 15:24
  • i think his problem was not very clear. before i have been ask to do the same thing.if the machine act only as a web application server,it will nearly meet the requirement.of course, i see your answer,i think your answer is bette. – snow8261 Jan 16 '13 at 06:23
  • Sorry for not being more excplicit on what I meant. Your answer might have been more helful if it had provided some more detail on _how_ to go about using SNMP4j to accomplish the task. – Jolta Jan 17 '13 at 08:08