This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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

 
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

 
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.
 
Rancher
Posts: 42975
76
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!