@@ -29,7 +29,8 @@ To have the version show up in the application list you can use the `build-info`
[[jmx-bean-management]]
=== JMX-bean management ===
To interact with JMX-beans in the admin UI you have to include https://jolokia.org/[Jolokia] in your application. In case you are using the `spring-boot-admin-starter-client` it will be pulled in for you, if not add Jolokia to your dependencies:
To interact with JMX-beans in the admin UI you have to include https://jolokia.org/[Jolokia] in your application. As Jolokia is servlet based there is no support for reactive applications.
In case you are using the `spring-boot-admin-starter-client` it will be pulled in for you, if not add Jolokia to your dependencies:
[source,xml]
.pom.xml
...
...
@@ -40,23 +41,6 @@ To interact with JMX-beans in the admin UI you have to include https://jolokia.o
</dependency>
----
[[loglevel-management]]
=== Loglevel management ===
For applications using Spring Boot 1.5.x (or later) you can manage loglevels out-of-the-box.
For applications using older versions of Spring Boot the loglevel management is only available for http://logback.qos.ch/[Logback]. It is accessed via JMX so <<jmx-bean-management, include Jolokia>> in your application. In addition you have configure Logback's `JMXConfigurator`:
NOTE: In case you are deploying multiple applications to the same JVM and multiple Logback-JMX-beans are present, the UI will select the JMXConfigurator with the context-name equals to your applications name. In this case you need to set the `contextName` in your logback-configuration.
[[spring-boot-admin-client]]
=== Spring Boot Admin Client ===
...
...
@@ -78,7 +62,7 @@ TIP: There are plenty of properties to influence the way how the SBA Client regi
| spring.boot.admin.client.api-path
| Http-path of registration endpoint at your admin server.
Can I include spring-boot-admin into my business application?::
*tl;dr* You can, but you shouldn't. +
You can set `spring.boot.admin.context-path` to alter the path where the UI and REST-API is served, but depending on the complexity of your application you might get in trouble. On the other hand in my opinion it makes no sense for an application to monitor itself. In case your application goes down your monitoring tool also does.
How do I customize the UI?::
You can only customize the UI by copying and modifying the source of `spring-boot-admin-ui` and adding your own module to your classpath.
First you need to setup your server. To do this just setup a simple boot project (using http://start.spring.io).
First you need to setup your server. To do this just setup a simple boot project (using http://start.spring.io). As Spring Boot Admin Server is capable of running as servlet or webflux application, you need to decide on this and add the according Spring Boot Starter. In this example we're using the servlet web starter.
. Add Spring Boot Admin Server starter to your dependencies:
. Pull in the Spring Boot Admin Server configuration via adding `@EnableAdminServer` to your configuration:
...
...
@@ -36,7 +38,7 @@ public class SpringBootAdminApplication {
NOTE: If you want to setup the Spring Boot Admin Server via war-deployment in a servlet-container, please have a look at the https://github.com/codecentric/spring-boot-admin/blob/master/spring-boot-admin-samples/spring-boot-admin-sample-war/[spring-boot-admin-sample-war].
See also the https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample/[spring-boot-admin-sample] project, which also adds security.
See also the https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-servlet/[spring-boot-admin-sample-servlet] project, which also adds security.
[[register-client-applications]]
=== Registering client applications ===
...
...
@@ -46,7 +48,7 @@ To register your application at the SBA Server you can either include the SBA Cl
[[register-clients-via-spring-boot-admin]]
==== Spring Boot Admin Client ====
Each application that wants to register has to include the Spring Boot Admin Client.
Each application that wants to register has to include the Spring Boot Admin Client. In order to secure the endpoints also add the `spring-boot-starter-security`.
. Add spring-boot-admin-starter-client to your dependencies:
+
...
...
@@ -58,6 +60,10 @@ Each application that wants to register has to include the Spring Boot Admin Cli
<1> The URL of the Spring Boot Admin Server to register at.
<2> Since Spring Boot 1.5.x all endpoints are secured by default. For the sake of brevity we're disabling the security for now. Have a look at the <<securing-spring-boot-admin,security section>> on how to deal with secured endpoints.
<2> As with Spring Boot 2 most of the endpoints aren't exposed via http by default, we expose all of them. For production you should carefully choose which endpoints to expose.
. Make the actuator endpoints accessible:
+
[source,java]
----
@Configuration
public static class SecurityPermitAllConfig extends WebSecurityConfigurerAdapter {
<1> For the sake of brevity we're disabling the security for now. Have a look at the <<securing-spring-boot-admin,security section>> on how to deal with secured endpoints.
[[discover-clients-via-spring-cloud-discovery]]
==== Spring Cloud Discovery ====
If you already use Spring Cloud Discovery for your applications you don't need the SBA Client. Just make the Spring Boot Admin Server a DiscoveryClient, the rest is done by our AutoConfiguration.
If you already use Spring Cloud Discovery for your applications you don't need the SBA Client. Just add a DiscoveryClient to Spring Boot Admin Server, the rest is done by our AutoConfiguration.
The following steps are for using Eureka, but other Spring Cloud Discovery implementations are supported as well. There are examples using https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-consul/[Consul] and https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-zookeeper/[Zookeeper].
The following steps uses Eureka, but other Spring Cloud Discovery implementations are supported as well. There are examples using https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-consul/[Consul] and https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-zookeeper/[Zookeeper].
Also have a look at the http://projects.spring.io/spring-cloud/spring-cloud.html[Spring Cloud documentation].
<1> For the sake of brevity we're disabling the security for now. Have a look at the <<securing-spring-boot-admin,security section>> on how to deal with secured endpoints.
. Tell the Eureka client where to find the service registry:
<2> Since Spring Boot 1.5.x all endpoints are secured by default. For the sake of brevity we're disabling the security for now. Have a look at the <<securing-spring-boot-admin,security section>> on how to deal with secured endpoints.
<2> As with Spring Boot 2 most of the endpoints aren't exposed via http by default, we expose all of them. For production you should carefully choose which endpoints to expose.
See also https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-eureka/[spring-boot-admin-sample-eureka].
@@ -6,7 +6,16 @@ The Spring Boot Admin Server can use Spring Clouds `DiscoveryClient` to discover
[[spring-cloud-discovery-static-config]]
==== SimpleDiscoveryClient configuration ====
Spring Boot Admin ships with the `SimpleDiscoveryClient` included. This allows you to specify client applications via configuration, without adding the SBA Client or a DiscoveryClient implementation to your monitored applications:
Spring Cloud provides a `SimpleDiscoveryClient`. It allows you to specify client applications via static configuration:
@@ -38,9 +38,9 @@ public class NotifierConfiguration {
==== Filtering notifications ====
The `FilteringNotifier` allows you to filter certain notification based on rules you can add/remove at runtime. It delegates the sending of notifications to another notifier.
If you add a `FilteringNotifier` to your `ApplicationContext` a RESTful interface on `api/notifications/filter` gets available. When this happens the ui shows options to manage the filters.
If you add a `FilteringNotifier` to your `ApplicationContext` a RESTful interface on `api/notifications/filter` gets available.
This notifier is useful if you don't want recieve notifications when deploying your applications. Before stopping the application you can add an (expiring) filter either via a `POST` request or the ui.
This notifier is useful if you don't want recieve notifications when deploying your applications. Before stopping the application you can add an (expiring) filter either via a `POST` request.
.How to configure filtering
[source,java]
...
...
@@ -386,4 +386,4 @@ To enable https://telegram.org/[Telegram] notifications you need to create and a
| spring.boot.admin.notify.telegram.message
| Text to send. SpEL-expressions are supported.
| `+++"<strong>#{application.name}</strong>/#{application.id} is <strong>#{to.status}</strong>"+++`
The Turbine module uses the hystrix-dashboard to display the metrics from a Turbine stream. The UI module does not configure Turbine for you. Either you run Turbine as a separate application or integrate it into your Spring Boot Admin application. Please see http://cloud.spring.io/spring-cloud-static/{spring-cloud-version}/#_turbine[Spring Cloud Reference] on setting up Turbine.