Commit 2df4ead4 authored by Phillip Webb's avatar Phillip Webb

Convert README.md -> README.adoc

parent 77d5453a
# Spring Boot - Actuator = Spring Boot - Actuator
Spring Boot Actuator includes a number of additional features to help Spring Boot Actuator includes a number of additional features to help you monitor and
you monitor and manage your application when it's pushed to manage your application when it's pushed to production. You can choose to manage and
production. You can choose to manage and monitor your application monitor your application using HTTP endpoints, with JMX or even by remote shell (SSH or
using HTTP endpoints, with JMX or even by remote shell (SSH or Telnet). Auditing, health and metrics gathering can be automatically applied to your
Telnet). Auditing, health and metrics gathering can be automatically application. The
applied to your application. The http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready[user guide]
[user guide](http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready)
covers the features in more detail. covers the features in more detail.
## Enabling the Actuator == Enabling the Actuator
The simplest way to enable the features is to add a dependency to the The simplest way to enable the features is to add a dependency to the
`spring-boot-starter-actuator` "Starter POM". To add the actuator to a `spring-boot-starter-actuator` ``Starter POM''. To add the actuator to a Maven based
Maven based project, add the following "starter" dependency: project, add the following "starter" dependency:
```xml [source,xml,indent=0]
----
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
``` ----
For Gradle, use the declaration: For Gradle, use the declaration:
```groovy [indent=0]
----
dependencies { dependencies {
compile("org.springframework.boot:spring-boot-starter-actuator") compile("org.springframework.boot:spring-boot-starter-actuator")
} }
``` ----
## Features == Features
* **Endpoints** Actuator endpoints allow you to monitor and interact with your
* **Endpoints** Actuator endpoints allow you to monitor and interact application. Spring Boot includes a number of built-in endpoints and you can also add
with your application. Spring Boot includes a number of built-in your own. For example the `health` endpoint provides basic application health
endpoints and you can also add your own. For example the `health` information. Run up a basic application and look at `/health` (and see `/mappings` for
endpoint provides basic application health information. Run up a basic a list of other HTTP endpoints).
app and look at "/health" (and see "/mappings" for a list of other * **Metrics** Spring Boot Actuator includes a metrics service with ``gauge'' and
HTTP endpoints). ``counter'' support. A ``gauge'' records a single value; and a ``counter'' records a
delta (an increment or decrement). Metrics for all HTTP requests are automatically
* **Metrics** Spring Boot Actuator includes a metrics service with recorded, so if you hit the `metrics` endpoint should should see a sensible response.
"gauge" and "counter" support. A "gauge" records a single value; and * **Audit** Spring Boot Actuator has a flexible audit framework that will publish events
a "counter" records a delta (an increment or decrement). Metrics for to an `AuditService`. Once Spring Security is in play it automatically publishes
all HTTP requests are automatically recorded, so if you hit the authentication events by default. This can be very useful for reporting, and also to
`metrics` endpoint should should see a response similar to this: implement a lock-out policy based on authentication failures.
* **Process Monitoring** In Spring Boot Actuator you can find `ApplicationPidListener`
* **Audit** Spring Boot Actuator has a flexible audit framework that which creates file containing application PID (by default in application directory and
will publish events to an `AuditService`. Once Spring Security is in file name is `application.pid`).
play it automatically publishes authentication events by default. This
can be very useful for reporting, and also to implement a lock-out
policy based on authentication failures.
* **Process Monitoring** In Spring Boot Actuator you can find
`ApplicationPidListener` which creates file containing application PID
(by default in application directory and file name is
`application.pid`).
This sample application uses Spring Boot and
http://beta.groovy-lang.org/docs/groovy-2.3.1/html/documentation/markup-template-engine.html[Groovy templates]
in the View layer. The templates for this app live in `classpath:/templates/`, which is
the conventional location for Spring Boot. External configuration is available via
``spring.groovy.template.*''.
This sample application uses Spring Boot and
[Groovy templates](http://beta.groovy-lang.org/docs/groovy-2.3.1/html/documentation/markup-template-engine.html)
in the View layer. The templates for this app live in
`classpath:/templates/`, which is the conventional location for Spring
Boot. External configuration is available via
"spring.groovy.template.*".
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment