Open bjagg opened 3 years ago
I would recommend to use a metric system like dropwizard: https://metrics.dropwizard.io/4.1.2/manual/healthchecks.html for before spring boot 2.0 app. And actuator with micrometer for spring boot 2.0 and upper.
With dropwizard, that I already used we define a HealthCheckRegistry on which you add already available module that will watch on your database, LDAP, cache, JVM, etc... also this can provide metrics and it can provide metrics to your metric tool ;)
Maybe this example is a good start: https://reflectoring.io/spring-boot-health-check/
@jgribonvald those are great suggestions; however, I completed a simple health check for now.
Once the Metrics v5 is out, we should consider integrated it as a metrics dashboard!
So to use the new healthcheck with database verification, we would switch the url to /uPortal/health-check?detail=DB ? And then if the database is down it'll return a 500 error?
@allanjackson I believe so. Have you been able to check it?
The
/uPortal/health-check
only provides a basic response that does not exercise much of the system.If would be more useful if the
check
would also perform a database call to confirm that key service is working. This can be triggered by an optional URL parameter.Other information may also be included, such as Java version, etc. N.B. do not supply too much information that may be beneficial to hackers.