Using spring-boot-admin for a non spring-boot project

602 views Asked by At

tl;dr
Requesting suggestions, guidelines or examples for possibilities to extend spring-boot-adminto use methods other than HTTP requests for health moitoring of non-spring projects like MariaDB.

Full version
There is a requirement to setup a monitoring application using spring-boot-admin. Several of the clients are spring-bootapplications and are easily implemented. There are however a couple of non spring-boot projects like the database server MariaDB.

The question is therefore formulated thusly : Is it possible to extend SBA to monitor the databse status by methods other than HTTP requests. One possible approach, for example, might be to check if it is possible to connect to the application specific TCP port to verify if the db server is still running. However, other possibilities can be exploited too.

One post I found similar to my question was this : https://github.com/codecentric/spring-boot-admin/issues/504. The key difference here though is that the provided answer still sugests a HTTP approach. The reference guide also does not suggest an alternative.

Should such a possibility exists, a brief outline of the approach or an example implementation would be most welcome.

1

There are 1 answers

0
joshiste On

SBA currently only supports checking health via http. But your DB should be implicitly monitored if you have an according health indicator on your business application.

It should be possible to extend the StatusUpdater#queryStatus() doing a tcp connect if it encounters an health-url beginning with tcp:// instead of http://...

And in case you accomplish that a PR is appreciated :)