Two Laptop Bag*
The moose likes Distributed Java and the fly likes Monitoring of server using JMX and SNMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Monitoring of server using JMX and SNMP" Watch "Monitoring of server using JMX and SNMP" New topic
Author

Monitoring of server using JMX and SNMP

Priya Lavti
Ranch Hand

Joined: Oct 11, 2004
Posts: 41
hi
I want to monitor my server using SNMP to get the information about craches, response time etc of the server. What technology should I use to do the same? Can JMX help me for this and How?

Thanks in advance
kiran


-Priya
SCJP 5.0
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
What kind of server are we talking about here? Where do you want to monitor it from?
Bill
Priya Lavti
Ranch Hand

Joined: Oct 11, 2004
Posts: 41
I've both Live server and application server for health monitoring. I want a facility that if there is some problem in server or in its data base a trap is sent to the management console and if possible an email is sent to the administrator. Management console is on different m/c and servers which are monitored are used in clusters.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

"baby pink" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy. User names cannot be obviously fake and must constist of a first name and a last name.

You can change your user name here.

That said... I think I found an article that covers what you're interested in... "Integrating your Java Application with Existing Network Management Solutions with JMX" on Gamelan's web site.


Thanks! and welcome to the JavaRanch!


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Priya Lavti
Ranch Hand

Joined: Oct 11, 2004
Posts: 41
Nice article!!
But still it seems that I am at nowhere. I am redefining my problem that I want to build an SNMP agent which can send an email, invoke an executable, generate an SNMP trap etc. And this agent should serve for both Live server and application server. Can this be done by JMX?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

pinks -

D'oh! Read the
JavaRanch Naming Policy again. User names cannot be obviously fake (which both "baby pink" and "pinks" are) and must constist of a first name and a last name ("pinks" doesn't fit this). We prefer that people use their real names, but you are free to use a made up name as long as it meets these criteria - something like "John Pinks", "Sally Pink", "Harold Pink", etc. - any of these would be fine.

You can change your user name here.

Sorry that I don't know a lot about all the pieces you need - here are the things I do know -
1.) I know a little about SNMP - and I've used a Java SNMP implementation before on a project - but I don't know a whole lot about everything SNMP does/can do.
2.) I've heard a little about JMX, but really haven't used it before.

It's definitely possible to combine SNMP and JMX - in fact there's a product that does so - how to implement this yourself? I'm not sure...

Could you do the follwing with it -
  • send an email - yep. Use the JavaMail API.
  • invoke an executable - yep. Use Runtime.exec().
  • generate an SNMP trap - yep. Use whatever SNMP API you're using.


  • As far as monitoring -
  • Live server - I don't know what a "Live server" is... but I guess as long as there's some way to "monitor" it, you could...
  • application server - As far as I know a lot of application servers do provide some way to monitor them through SNMP... so it's probable that you'd just have to read or search for some material on how to do so for your specific app server.

  • [ July 26, 2005: Message edited by: Nathan Pruett ]
    Priya Lavti
    Ranch Hand

    Joined: Oct 11, 2004
    Posts: 41
    Basically I want to develope a common way or some sort of API to monitor both the server. I dont want that my implementation to be dependant on the type of application server. In addition to this my servers are running in cluster environment and I want to monitor them from a single management console.
    I also want the information about SNMP Agent builder API. Are there any such API's freely available??
    Nathan Pruett
    Bartender

    Joined: Oct 18, 2000
    Posts: 4121

    Doing a google for "SNMP Java free" I found a few possible candidates -

  • SNMP4J - an open source project. Offers both an SNMP API and an SNMP Agent API.
  • AdventNet - a commercial product. There is a free version of their SNMP API, and they offer a "try-it-for-30-days" trial version of their SNMP Agent API.
  • iReasoning - a commercial product. They offer both their SNMP API and their SNMP Agent API as "try-it-for-30-days" trial versions.
  • jSNMP - a commercial product. Again, they offer their SNMP API and SNMP Agent API as "try-it-for-30-days" trial versions, but they will also give educational users a free license.

  •  
     
    subject: Monitoring of server using JMX and SNMP
     
    Similar Threads
    Tomcat Application Server adding a plugin
    This weeks giveaway "JMX in Action"
    SNMP trap generation
    JMX Instrumenting an EJB?