Cloud Computing: The Digital Shift 2.0 – Understanding the Current Market Trends

Spring Boot Actuator- Web application monitoring made easy !!!! – Josh Software


  • What is spring boot actuator?
  • Enable actuator in spring boot application
  • What are actuator endpoints?
  • Enabling spring boot actuator endpoints
  • Actuator metrics endpoint

What is spring boot actuator?

Spring boot actuator module provides you the features which will help you monitor and manage your application. You can monitor your application status, gather various statistics related to CPU/memory usage, web requests etc., using spring boot actuator, without writing a single line of code.

How to enable actuator in spring boot application?

Enabling actuator in spring boot application is ridiculously simple. For a maven based application, just include below dependency in your pom.xml


Now, just re-deploy your application and start exploring spring boot actuator endpoints.

What are actuator endpoints?

Once above dependency is included, on application re-deployment, you will be provided with various endpoints through which actuator exposes details about the running application, like health, metrics, application info, thread-dump, env, etc. These endpoints can be exposed over HTTP.
By default, for all endpoints the default context path is /actuator

Below are the few built-in endpoints in Spring boot actuator

Endpoints Description
/info Returns static application information if added any
/env Returns list of properties in current environment
/health Returns application health information.
/beans Returns a complete list of all the Spring beans in your application.
/mappings Returns list of all the controller mappings in your application including actuator endpoints
/threaddump It performs a thread dump.
/metrics Returns list of metrics related to JVM memory used, system CPU usage and much more.
/metrics/{metric-name} Returns information/statistics related to given metric

Enabling spring boot actuator endpoints

By default, all the endpoints are enabled in actuator, but only two endpoints are exposed over http: /info and /health.

To enable any endpoint in actuator, follow below format to add property
E.g. to enable health endpoint,

To disable any endpoint in actuator,

To expose any endpoints over http,

management.endpoints.web.exposure.include=info, metrics

To expose all endpoints over http, you can use ‘*’ wildcard as below,


To exclude some endpoints from being exposed over http,


Additional properties

By default, /info endpoint returns empty response as there is no default application information available. To return custom application information, provide it in below format in your
You can provide hierarchical information as well.

To return application name, version etc as info, Actuator Demo Application is actuator demo application with basic configuration

Above information results in below response from /info endpoint,

    "app": {
        "description": "Spring Actuator Demo Application",
        "version": "1.0.0",
        "name": "This is actuator demo application with basic configuration"

By default, actuator endpoints are exposed on your application’s http port. To expose these endpoints using different port,


By default, base path for all endpoint is /actuator. It can be changed using below property,

management.endpoints.web.base-path = /manage

With above change, you should be able to access any actuator endpoint as

Actuator metrics endpoint

The /metrics endpoint is used to expose application statistics related to JVM memory usage, system CPU usage, web requests etc. Like any other endpoint, the /metrics endpoint can be exposed over http for use.

management.endpoints.web.exposure.include=info, health, metrics

By default, all metrics are enabled. You can view the list of metrics available through endpoint: /actuator/metrics
To disable metrics from being generated, add property in format below,
management.metrics.enable.<metric> = false

E.g. For disable metrics related to tomcat session,

mmanagement.metrics.enable.tomcat = false

You can view data related to one metric through endpoint: /actuator/metrics/<metric-name>
E.g. To view system uptime, execute /actuator/metrics/process.uptime. You will receive output in below format,

    "name": "process.uptime",
    "description": "The uptime of the Java virtual machine",
    "baseUnit": "seconds",
    "measurements": [
            "statistic": "VALUE",
            "value": 605.497
    "availableTags": []

Spring boot internally uses Micrometer as its metrics collector. Micrometer works as a facade for various monitoring tools like Prometheus, Influx, Graphite etc. All the metrics data collected by micrometer can be exported in the format which the monitoring system supports, via a dedicated endpoint.

I hope this article helps you to configure actuator in your spring boot application. Happy coding!!

Click here for demo application source code.

To learn more about spring boot actuator, refer this link.

Leave a Comment

Your email address will not be published.