• Post Reply Bookmark Topic Watch Topic
  • New Topic

Monitor webserver using java  RSS feed

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to monitor a web server. I want to get the webserver's start time, end time, status of the server, and if it goes to not responding stage I should intimate and resolve the problem.

Can I do the above tasks using java. If can In what packages I should concentrate to successfully complete this task. Give me an idea about this.

Thanks & regards,
Maheshwaran Devaraj
 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the java.net.URL class you can send requests for the root page of the server (or the root page of any application you want to monitor). Thus you can make sure that are getting a 200 (OK) response, and that you get it in a timely fashion. If you're getting something else or no reply, you might want to repeat that after a minute, and if there's still no response, send an email to an admin or take whatever action is appropriate.
 
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of webserver? Tomcat, for example, gives you a lot of control over JMX.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!