Anyone know how to get information of incoming threads / queue size? I want to include it in health check (class extending AbstractHealthIndicator).
Checking the Health of Individual Components Creating a custom health indicator is done in two steps: Implement the HealthIndicator interface and override the health() method. Register the health indicator class as a Spring bean by adding the @Component annotation (or by using Java Config).
A simple way to see if Tomcat is running is to check if there is a service listening on TCP port 8080 with the netstat command. This will, of course, only work if you are running Tomcat on the port you specify (its default port of 8080, for example) and not running any other service on that port.
Spring Boot is a popular Java-based framework to develop microservices. By default, the Spring Tool Suite (STS) IDE -- which is used to build a Spring Boot application -- will automatically create an embedded Tomcat server with the microservices developed each time a build or deployment occurs.
Tomcat 7 & 8.0 work with Spring Boot, but the default is to use Tomcat 8.5. If you cannot use Tomcat 8.5 (for example, because you are using Java 1.6) you will need to change your classpath to reference a different version.
You can use Actuator and Micrometer to get data about tomcat in spring boot. But if you want information about Thread you must configure more in spring boot config file.
server.tomcat.mbeanregistry.enabled=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With