Commit 440a342a by Johannes Edmeier

Update docs to Spring Boot Admin 1.3.0

parent 9085e53f
......@@ -32,12 +32,12 @@ Add the following dependency to your pom.xml.
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId>
<version>1.2.4</version>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId>
<version>1.2.4</version>
<version>1.3.0</version>
</dependency>
```
......@@ -74,7 +74,7 @@ Each application that want to register itself to the admin application has to in
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>1.2.4</version>
<version>1.3.0</version>
</dependency>
```
Inside your configuration (e.g. application.properties) you also have to define the URL of the Spring Boot Admin server, e.g.
......@@ -118,7 +118,7 @@ Configure a JavaMailSender using spring-boot-starter-mail and set a recipient:
```
spring.mail.host=smtp.example.com
spring.boot.admin.notify.to=admin@example.com
spring.boot.admin.notify.mail.to=admin@example.com
```
For all configuration options see [spring-boot-admin-server](https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-server/README.md)
......
spring-boot-admin-server
================================
========================
## Easy Setup
Add the following dependency to your pom.xml.
......@@ -8,12 +8,12 @@ Add the following dependency to your pom.xml.
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId>
<version>1.2.4</version>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId>
<version>1.2.4</version>
<version>1.3.0</version>
</dependency>
```
......@@ -41,70 +41,69 @@ Since the DiscoveryClient doesn't tell the management.context-path you can suffi
Explictly disable DiscoveryClient support by setting ``spring.boot.admin.discover.enabled=false``.
## Mail notification options:
## Mail notification:
To enable mail-notification you just have to add a JavaMailSender to you ApplicationContext. The simplest way to achieve this is by adding the spring-boot-mail-starter to your dependencies and setting `spring.mail.host`.
### Further options:
| Name | Description |
| --------------------- | ----------- |
|spring.boot.admin.notify.enabled|enable mail notification (default: true)|
|spring.boot.admin.notify.to|comma-delimited list of mail recipients (default: "root@localhost")|
|spring.boot.admin.notify.cc|comma-delimited list of mail cc-recipients|
|spring.boot.admin.notify.from|sender of mail|
|spring.boot.admin.notify.subject|mail-subject; SpEL-expressions supported (default: "#{application.name} (#{application.id}) is #{to.status}") |
|spring.boot.admin.notify.text|mail-body; SpEL-expressions supported (default: "#{application.name} (#{application.id})\nstatus changed from #{from.status} to #{to.status}\n\n#{application.healthUrl}"|
|spring.boot.admin.notify.ignoreChanges|comma-deleiited list of status changes to be ignored. (default: "UNKNOWN:UP")|
|spring.boot.admin.notify.mail.enabled|enable mail notification (default: true)|
|spring.boot.admin.notify.mail.to|comma-delimited list of mail recipients (default: "root@localhost")|
|spring.boot.admin.notify.mail.cc|comma-delimited list of mail cc-recipients|
|spring.boot.admin.notify.mail.from|sender of mail|
|spring.boot.admin.notify.mail.subject|mail-subject; SpEL-expressions supported (default: "#{application.name} (#{application.id}) is #{to.status}") |
|spring.boot.admin.notify.mail.text|mail-body; SpEL-expressions supported (default: "#{application.name} (#{application.id})\nstatus changed from #{from.status} to #{to.status}\n\n#{application.healthUrl}"|
|spring.boot.admin.notify.mail.ignoreChanges|comma-delimited list of status changes to be ignored. (default: "UNKNOWN:UP")|
## Pagerduty notification:
To enable pagerduty-notifications you just have to add a generic service for your pagerduty-account and set ``spring.boot.admin.notify.pagerduty.service-keya`` to the service-key.
### Further options:
| Name | Description |
| ---------------------- | ----------- |
|spring.boot.admin.notify.pagerduty.enabled|enable mail notification (default: true)|
|spring.boot.admin.notify.pagerduty.service-key | service-key for Pagerduty |
|spring.boot.admin.notify.pagerduty.uri | The Pagerduty-rest-api url (default: https://events.pagerduty.com/generic/2010-04-15/create_event.json) |
|spring.boot.admin.notify.pagerduty.description | description to use in the event. SpEL-expressions supported (default: #{application.name}/#{application.id} is #{to.status}) |
|spring.boot.admin.notify.pagerduty.client | client-name to use in the event |
|spring.boot.admin.notify.pagerduty.clientUrl | client-url to use in the event |
|spring.boot.admin.notify.pagerduty.ignoreChanges|comma-delimited list of status changes to be ignored. (default: "UNKNOWN:UP")|
## Hazelcast Support
Spring Boot Admin Server supports cluster replication with Hazelcast.
It is automatically enabled when its found on the classpath.
Spring Boot Admin Server supports cluster replication with Hazelcast. It is automatically enabled when a HazelcastConfig- or HazelcastInstance is present.
Also have a look at the [Spring Boot support for Hazelcast](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-hazelcast).
Just add Hazelcast to your dependencies:
1. Add Hazelcast to your dependencies:
```xml
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
<version>3.3.3</version>
</dependency>
```
And thats it! The server is going to use the default Hazelcast configuration.
### Custom Hazelcast configuration
To change the configuration add a ``com.hazelcast.config.Config``-bean to your application context (for example with hazelcast-spring):
Add hazelcast-spring to dependencies:
```xml
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-spring</artifactId>
<version>3.3.3</version>
</dependency>
```
Import hazelcast spring configuration xml-file:
2. Instantiate a HazelcastConfig:
```java
@Configuration
@EnableAutoConfiguration
@EnableAdminServer
@ImportResource({ "classpath:hazelcast-config.xml" })
public class Application {
public class SpringBootAdminApplication {
@Bean
public Config hazelcastConfig() {
return new Config().setProperty("hazelcast.jmx", "true")
.addMapConfig(new MapConfig("spring-boot-admin-application-store").setBackupCount(1)
.setEvictionPolicy(EvictionPolicy.NONE))
.addListConfig(new ListConfig("spring-boot-admin-event-store").setBackupCount(1)
.setMaxSize(1000));
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
SpringApplication.run(SpringBootAdminApplication.class, args);
}
}
```
Write xml-config hazelcast-config.xml:
```xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hz="http://www.hazelcast.com/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.hazelcast.com/schema/spring http://www.hazelcast.com/schema/spring/hazelcast-spring-3.3.xsd">
<hz:config id="hazelcastConfig">
<hz:instance-name>${hz.instance.name}</hz:instance-name>
<hz:map name="spring-boot-admin-application-store" backup-count="1" eviction-policy="NONE" />
</hz:config>
</beans>
```
### Further configuration
Disable Hazelcast support by setting ``spring.boot.admin.hazelcast.enabled=false``.
To alter the name of the Hazelcast-Map set ``spring.boot.admin.hazelcast.map= my-own-map-name``.
To alter the name of the hazelcast-map backing the application-store set ``spring.boot.admin.hazelcast.map= my-own-map-name``.
To alter the name of the hazelcast-list backing the event-store set ``spring.boot.admin.hazelcast.event-store=my-own-list-name``
spring-boot-starter-admin-client
================================
This [Spring-Boot starter](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-starter-poms "Spring Boot docu") that provides services and controllers that a required if an application show be able to be administrated with the [spring-boot-admin application](https://github.com/codecentric/spring-boot-admin "GitHub project").
This [Spring-Boot starter](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-starter-poms "Spring Boot Reference Guide") that provides services and controllers that a required if an application show be able to be administrated with the [spring-boot-admin application](https://github.com/codecentric/spring-boot-admin "GitHub project").
This client uses the [AutoConfiguration](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-auto-configuration "Spring Boot docu") feature of Spring Boot to register service and controller beans in the application context.
This client uses the [AutoConfiguration](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-auto-configuration "Spring Boot Reference Guide") feature of Spring Boot to register service and controller beans in the application context.
The main service that is used is a registrar that registeres the application at the spring-boot-admin application by periodically calling a REST-API to perform the registration of itself.
......@@ -30,4 +30,3 @@ Options from other spring boot features. These should be set to enable all featu
| ----------------------- | ----------- |
| spring.application.name | Name to be shown in the application list. Name of the ApplicationContext. |
| info.version | Version number to be shown in the application list. Also published via /info-endpoint. |
| logging.file | Path to the applications logfile for access via spring-boot-admin. From Spring Boot logging configuration. |
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