I have an existing Spring Application, and I am trying to bind actuator to it. With available examples and documentation, I have added dependencies in pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>1.5.10.RELEASE</version>
</dependency>
I have added below configurations in my servlet.xml
<bean id="endpointAutoConfiguration" class="org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration"/>
<bean id="publicMetricsAutoConfiguration" class="org.springframework.boot.actuate.autoconfigure.PublicMetricsAutoConfiguration"/>
<bean id="healthIndicatorAutoConfiguration" class="org.springframework.boot.actuate.autoconfigure.HealthIndicatorAutoConfiguration"/>
With following configurations
endpoints.health.enabled=true
endpoints.health.id=health
endpoints.health.enabled=true
management.security.enabled=false
endpoints.health.sensitive=false
server.port=8080
management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=*
endpoints.actuator.enabled=true
endpoints.logfile.enabled=true
While debugging, I have seen that in class org.springframework.boot.actuate.endpoint
3 classes are picked up for health indicator DataSourceHealthIndicator
, DiskSpaceHealtIndicator
and JmsHealthIndicator
and the details it picked are correct for autowired instances.
While enabling springframework logs in DEBUG mode, I saw below lines in log for many properties related to actuator
07:04:01,302 DEBUG [localhost-startStop-1]: JndiLocatorDelegate ReqId:() DFReqId:() - Converted JNDI name [java:comp/env/endpoints.health.enabled] not found - trying original name [endpoints.health.enabled]. javax.naming.NameNotFoundException: Name [endpoints.health.enabled] is not bound in this Context. Unable to find [endpoints.health.enabled].
Not getting the pointer, what I am missing.
Getting 404 exception on http://localhost:8080/health, http://localhost:8080/info