Programmatically add Health Indicators to Springboot Actuator Group

Viewed 237

Problem

I would like to programmatically include health indicators into a actuator group. They only way to do this right now is in a *.properties file.

Use Case

Depending on what beans or other properties are found in the application it would be great to automatically or manually add in Health Indicators into the readiness/liveness groups. While it seems easy enough to setting the property, in many cases developers may forget to set it up or there are old projects that people will not known what health indicators may need to be configured.

Example:

If a datasource health indicator is enabled in the application, it would be nice to autoconfigure the that health indicator into the readiness group. However we wouldn't want this if the datasource health indicator is not active.

Thanks!

0 Answers
Related