• Post Reply Bookmark Topic Watch Topic
  • New Topic

writing a monitor for an app/web server instance  RSS feed

 
Ajay Saxena
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to design a prototype for an app/web server monitor.

I was wondering on the following aspects.

1> How should the monitor send heartbeat to the server process?

Should it be in the form UDP/TCP-IP packets on the same service port on which the server is listening for incoming client connections?

Or does these app/web servers open up some separate management port which could be pinged periodically by the monitor?

2> Are there some standard design approaches for building such monitors/watchdogs?

The pseudocode for the watchdog is furnished below

 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you must look into Java Management Extensions
Commercially available app and web servers like weblogic, tomcat have support for JMX.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monitoring can be done on various levels.

To test whether a machine is up and running you can use Ping (which can't be implemented in Java, but you can use Runtime.exec to run the native version).

To test whether it listens to HTTP you can use the URLConnection class to send a request for the root page.

To look inside the Java application, JMX and its JConcole tool would be the way to go.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!