Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logbook logging actuator health calls even when excluded

I am using Zolando Logbook for Spring Boot services (Version 2.1.6 spring boot version, 1.13.0 Logbook version) and the actuator health endpoint gets logged even though it is specified as excluded. Other endpoints are excluded correctly when included in yaml file.

This is the relevant section of the yaml file:

logbook:
  exclude:
    - /actuator/health
    - /actuator/**
    - /health
    - /v2/api-docs
    - /swagger-ui.html
like image 822
Keith WIlde Avatar asked Oct 31 '25 04:10

Keith WIlde


1 Answers

I had the same problem, I tried as following and it worked:

logbook:
  exclude[1]: '**/swagger-ui.html'
  exclude[0]: '**/v2/api-docs'
  exclude[3]: '**/swagger-resources/**'
  exclude[2]: '**/webjars/**'
  exclude[5]: '**/'
  exclude[4]: '**/csrf'

In case you have .properties file :

logbook.exclude[0]=**/v2/api-docs
logbook.exclude[1]=**/swagger-ui.html
logbook.exclude[2]=**/webjars/**
logbook.exclude[3]=**/swagger-resources/**
logbook.exclude[4]=**/csrf
logbook.exclude[5]=**/

In case you have to exclude more paths, You may define as :

logbook.write.max-body-size=10

I took the solution from here

like image 177
Mostafa Avatar answered Nov 02 '25 23:11

Mostafa