You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since there is no Heartbeat or InstanceRegisteredEvent when using the SimpleDiscoveryClient we need to listen on the ApplicationReadyEvent and register the configured instances closescodecentric#505
Copy file name to clipboardExpand all lines: spring-boot-admin-docs/src/main/asciidoc/getting-started.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ See also the https://github.com/codecentric/spring-boot-admin/tree/master/spring
44
44
[[register-client-applications]]
45
45
=== Registering client applications ===
46
46
47
-
To register your application at the SBA Server you can either include the SBA Client or use http://projects.spring.io/spring-cloud/spring-cloud.html[Spring Cloud Discovery] (e.g. Eureka)
47
+
To register your application at the SBA Server you can either include the SBA Client or use http://projects.spring.io/spring-cloud/spring-cloud.html[Spring Cloud Discovery] (e.g. Eureka, Consul, ...). There is also a <<spring-cloud-discovery-static-config,simple option using a static configuration on the SBA Server side>>.
Copy file name to clipboardExpand all lines: spring-boot-admin-docs/src/main/asciidoc/server-discovery.adoc
+52-26Lines changed: 52 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,65 @@
1
1
[[spring-cloud-discovery-support]]
2
2
=== Spring Cloud Discovery ===
3
3
4
-
The Spring Boot Admin Server can use Spring Clouds `DiscoveryClient` to discover applications. The advantage is that the clients don't have to include the `spring-boot-admin-starter-client`. You just have to add a DiscoveryClient to your admin server - everything else is done by AutoConfiguration.
5
-
The setup is explained <<discover-clients-via-spring-cloud-discovery,above>>.
6
-
7
-
==== ServiceInstanceConverter ====
4
+
The Spring Boot Admin Server can use Spring Clouds `DiscoveryClient` to discover applications. The advantage is that the clients don't have to include the `spring-boot-admin-starter-client`. You just have to add a `DiscoveryClient` implementation to your admin server - everything else is done by AutoConfiguration.
5
+
6
+
[[spring-cloud-discovery-static-config]]
7
+
==== SimpleDiscoveryClient configuration ====
8
+
9
+
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:
10
+
11
+
[source,yml]
12
+
.application.yml
13
+
----
14
+
spring:
15
+
cloud:
16
+
discovery:
17
+
client:
18
+
simple:
19
+
instances:
20
+
test:
21
+
- uri: http://instance1.intern:8080
22
+
metadata:
23
+
management.context-path: /actuator
24
+
- uri: http://instance2.intern:8080
25
+
metadata:
26
+
management.context-path: /actuator
27
+
----
28
+
29
+
==== Other DiscoveryClient implementations (Eureka, Zookeeper, Consul, ...) ====
30
+
Spring Boot Admin supports all other implementation of Spring Cloud's `DiscoveryClient`. You need to add it to the Spring Boot Admin Server and configure it properly.
31
+
An <<discover-clients-via-spring-cloud-discovery,example setup using Eureka>> is shown above.
32
+
33
+
==== Converting ServiceInstances into monitored applications ====
8
34
9
35
The information from the service registry are converted by the `ServiceInstanceConverter`. Spring Boot Admin ships with a default and Eureka converter implementation. The correct one is selected by AutoConfiguration.
10
36
11
37
TIP: You can modify how the information from the registry is used to register the application by using SBA Server configuration options and instance metadata. The values from the metadata takes precedence over the server config. If the plenty of options don't fit your needs you can provide your own `ServiceInstanceConverter`.
12
38
13
39
NOTE: When using Eureka, the `healthCheckUrl` known to Eureka is used for health-checking, which can be set on your client using `eureka.instance.healthCheckUrl`.
14
40
41
+
.Instance metadata options
42
+
|===
43
+
| Key |Value |Default value
44
+
45
+
| user.name +
46
+
user.password
47
+
| Credentials being used to access the endpoints.
48
+
|
49
+
50
+
| management.port
51
+
| The port is substituted in the service URL and will be used for accessing the actuator endpoints.
52
+
|
53
+
54
+
| management.context-path
55
+
| The path is appended to the service URL and will be used for accessing the actuator endpoints.
0 commit comments