سؤال

I have a Java web app running (with Spring) and I wish to have a health check performed every few minutes. I'm not checking the Tomcat or the JVM but strictly on the application level so I have a few ideas for stuff to check.

For example:

  • make a simple query to check DB sanity
  • check that the environment is "production" (cause that's the only one that'll be monitored)

Basically I'm looking for other ideas and suggestions for what to check or some best practices for it.

Any ideas?

هل كانت مفيدة؟

المحلول

I'd recommend to try Metrics Framework

نصائح أخرى

We have developed a special URL that accesses a spring mvc controller that tests various aspects of our application. You just need to return a 500 if your find anything wrong and give that url link to your favorite monitoring tool. We use both pingdom and nagios at our facility.

https://www.pingdom.com/

http://nagios.org/

Perhaps create a page that is generated by the db, have some particular output on it that nagios checks for, so then you will know the http port is up, the webserver is actually serving a web page, and the db is able to be accessed by the app.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top