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

[FEATURE] Add in actuator health indicator #132

Open
petergphillips opened this issue May 17, 2023 · 2 comments
Open

[FEATURE] Add in actuator health indicator #132

petergphillips opened this issue May 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@petergphillips
Copy link

I'm not sure if this should be a feature request for this project or the spring boot actuator project since the elasticsearch indicator is provided by that project. Raising here since the spring-data-elasticsearch project is a spring project, whereas spring-data-opensearch is not, hopefully this is the right place!

Is your feature request related to a problem?

If our application is unable to connect to opensearch then we can see lots of errors in the logs such as

2023-05-17 13:16:26.135 ERROR 1862 --- [nt_sniffer[T#1]] org.opensearch.client.sniff.Sniffer      : error while sniffing nodes |  

however the application does start up and the /actuator/health endpoint shows that all is healthy status is UP. This is incorrect since the application is certainly not healthy if it can't connect to opensearch.

What solution would you like?

It would therefore be good to have a health indicator that is automatically included to indicate whether we can connect to opensearch. Note that the elasticsearch health indicator actually calls the /_cluster/health endpoint, which goes beyond checking whether we can connect to the cluster and actually lets us know the state of the cluster. If this is a relatively cheap operation then this sounds fine, otherwise some sort of ping would normally be preferable.

What alternatives have you considered?

We could write our own health indicator, but it feels like there should be something out of the box.

@petergphillips petergphillips added enhancement New feature or request untriaged labels May 17, 2023
@petergphillips
Copy link
Author

We've written our own health indicator - see https://github.com/ministryofjustice/hmpps-prisoner-search-indexer/pull/7/files. Happy to create a PR with the same changes in this repo

@wbeckler
Copy link

@petergphillips That would be awesome!

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

No branches or pull requests

2 participants