Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance /uPortal/health-check #2380

Open
bjagg opened this issue Jul 13, 2021 · 4 comments
Open

Enhance /uPortal/health-check #2380

bjagg opened this issue Jul 13, 2021 · 4 comments
Assignees
Labels
enhancement Improvement

Comments

@bjagg
Copy link
Member

bjagg commented Jul 13, 2021

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.

@bjagg bjagg added the enhancement Improvement label Jul 13, 2021
@bjagg bjagg self-assigned this Jul 13, 2021
@jgribonvald
Copy link
Contributor

jgribonvald commented Jul 15, 2021

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/

@bjagg
Copy link
Member Author

bjagg commented Aug 3, 2021

@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!

@allanjackson
Copy link
Contributor

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?

@bjagg
Copy link
Member Author

bjagg commented Sep 13, 2021

@allanjackson I believe so. Have you been able to check it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement
Projects
None yet
Development

No branches or pull requests

3 participants