3
votes

Small question regarding some actuator endpoints returning 404 please. I have a web app, based on Webflux 2.4.2, and for testing this issue only, I am using

management.endpoints.web.exposure.include=*

Actuator is working, because a curl will get the response for /health /metrics and other endpoints.

However, for those endpoints /auditevents /httptrace /integrationgraph /sessions, I am not able to get anything, besides a http 404.

[05/Feb/2021:13:00:18 +0000] "OPTIONS /auditevents HTTP/1.1" 404 141 55 ms

  • May I ask what did I miss please?
  • What are the steps to enable the /auditevents endpoint please?
  • What are the steps to enable the /httptrace endpoint please? I have sleuth and Zipkin working
  • What are the steps to enable the /integrationgraph endpoint please?
  • What are the steps to enable the /sessions endpoint please?

Those are really the only endpoints returning 404, still do not know why. Don't want to spam with one question same question per endpoint. All other actuator endpoints are fine.

Thank you

1
Spring boot version ?Anish B.
from the log line it looks like you are using the OPTIONS http method. I believe you should be using the GET http method for /auditevents. If you are using curl to test these endpoints you can pass in -X GETMichael McFadyen
Oh yes, thanks. But getting the exact same wit -X GET, still a 404PatPatPat

1 Answers

6
votes

According to Spring Boot Reference Docs :

To enable /httptrace in the actuator, then you have to create a bean of InMemoryHttpTraceRepository class in the custom @Configuration class which provides the trace of the request and response.

@Bean
public HttpTraceRepository htttpTraceRepository() {
  return new InMemoryHttpTraceRepository();
}

To enable /auditevents in the actuator, then you have to create a bean of InMemoryAuditEventRepository class in the custom @Configuration class which exposes audit events information.

@Bean
public AuditEventRepository auditEventRepository() {
  return new InMemoryAuditEventRepository();
}

To enable /integrationgraph in actuator, you have to add spring-integration-core dependency in the pom.xml (as per documentation) :

<dependency>
    <groupId>org.springframework.integration</groupId>
    <artifactId>spring-integration-core</artifactId>
</dependency>

or if you are having a spring-boot project, then add this :

  <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-integration</artifactId>
  </dependency>

/actuator/sessions are by-default enabled. But still you can add this explicitly to check the behaviour.

Add this in application.properties.

management.endpoint.sessions.enabled = true