Working with additional Actuator endpoints

Spring Boot Actuator provides lots of extra data. The following table is a quick summary:

Actuator Endpoint

Description

auditevents

Exposes audit events for the current application

autoconfig

Reports what Spring Boot did and didn't autoconfigure and why

beans

Reports all the beans configured in the application context (including ours as well as the ones autoconfigured by Boot)

configprops

Exposes all configuration properties

env

Reports on the current system environment

health

A simple endpoint to check the life of the app

heapdump

Returns a GZip-compressed hprof heap dump file (hprof is a tool by every JDK)

info

Serves up custom content from the app

logfile

Returns the contents of the logfile (assuming logging.file or logging.path has been set)

loggers

Lists all configured loggers and their levels. Also supports updating log levels through POST operations.

metrics

Shows counters and gauges on web usage

mappings

Gives us details about all Spring WebFlux routes

status

threaddump

Creates thread dump report

trace

Every one of these is prefixed (by default) with /application/. For example, health is found at /application/health. To override this prefix, just add management.context-path to application.properties and swap out your preferred prefix (such as /manager). Also, management.context-path is relative to server.context-path.

It's possible to adjust the port that Actuator endpoints are served on. Setting the management.port property to 8081 will change the port for all these endpoints to 8081. We can even adjust the network address used by setting management.address=127.0.0.1. This setting would make these information-rich endpoints only visible to the local box and curtail visibility to outside connections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.77.153