From be0c2287aecc1a3725e8b87e834494cee50cc06f Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Wed, 4 Feb 2015 15:57:45 +0100 Subject: [PATCH] Documentation for status page and health URL paths The Eureka instance has to provide status page and health check URLs. We only provide a sensible default if the app is a vanilla Actuator. This change shows users explicitly how to customize those settings. Fixes gh-192 --- .../main/asciidoc/spring-cloud-netflix.adoc | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/src/main/asciidoc/spring-cloud-netflix.adoc b/docs/src/main/asciidoc/spring-cloud-netflix.adoc index be1919ee..d618a80b 100644 --- a/docs/src/main/asciidoc/spring-cloud-netflix.adoc +++ b/docs/src/main/asciidoc/spring-cloud-netflix.adoc @@ -73,6 +73,28 @@ ID, or VIP). See {github-code}/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaInstanceConfigBean.java[EurekaInstanceConfigBean] and {github-code}/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java[EurekaClientConfigBean] for more details of the configurable options. +=== Status Page and Health Indicator + +The status page and health indicators for a Eureka instance default to +"/info" and "/health" respectively, which are the default locations of +useful endpoints in a Spring Boot Actuator application. You need to +change these, even for an Actuator application if you use a +non-default context path or servlet path +(e.g. `server.servletPath=/foo`) or management endpoint path +(e.g. `management.contextPath=/admin`). Example: + +.application.yml +---- +eureka: + instance: + statusPageUrlPath: ${management.contextPath}/info + healthCheckUrlPath: ${management.contextPath}/health +---- + +These links show up in the metadata that is consumers by clients, and +used in some scenarios to decide whether to send requests to your +application, so it's helpful if they are accurate. + === Making the Eureka Instance ID Unique By default a eureka instance is registered with an ID that is equal to its host name (i.e. only one service per host). Using Spring Cloud you can override this by providing a unique identifier in `eureka.instance.metadataMap.instanceId`. For example: