The Spring Cloud Services service broker and the Spring Cloud Config Server backing apps for Config Server and Service Registry service instances use Spring Boot Actuator. Actuator adds a number of endpoints to these apps, including the endpoints shown in the table.
ID | Function |
---|---|
health |
Displays information about the health and status of the app |
info |
Displays selected information about the app |
See the Endpoints section of the Actuator documentation for the full list of endpoints.
Service Broker endpoints
The Spring Cloud Services service broker activates the Spring Boot Actuator health
and info
endpoints.
Locating the Service Broker URL
You can locate the service broker URL (scs-service-broker
) using the Cloud Foundry CLI (cf CLI) by running the cf service-brokers
command.
$ cf service-brokers
Getting service brokers as user...
name url
p-dataflow https://p-dataflow.apps.example.com
p-rabbitmq https://pivotal-rabbitmq-broker.sys.example.com
scs-service-broker https://scs-service-broker.sys.example.com
Accessing endpoints
You can access an Actuator endpoint on the service broker by appending the path /actuator/ENDPOINT
to the broker URL, where ENDPOINT
is the ID of the endpoint.
To view the output of the health
endpoint, for example, append /actuator/health
to the service broker’s URL. The following example uses cURL to make a request of the endpoint:
$ curl https://scs-service-broker.sys.example.com/actuator/health
Given an unauthenticated request, the health
endpoint displays only summary health information. With the cf CLI, you can use the cf oauth-token
command to obtain an OAuth 2.0 token for use in making an authenticated request to this endpoint:
$ curl -H "Authorization: $(cf oauth-token)" https://scs-service-broker.sys.example.com/actuator/health
Service instance endpoints
The backing apps for Config Server and Service Registry service instances activate the Spring Boot Actuator health
endpoint. The following sections contain information about how to access it.
Locating the service instance URL
To obtain the URL of a service instance backing app, run the cf service
command with the name of the service instance:
$ cf service my-config-server
Showing info of service my-config-server in org myorg / space dev as user...
name: my-config-server
service: p.config-server
tags:
plan: standard
description: Config Server
documentation:
dashboard: https://config-server-3007518e-302e-4e28-be3a-f516e7b2a4fe.apps.example.com/dashboard
Copy the URL given for dashboard
, removing the /dashboard
path. This is the URL of the service instance backing app. In the example shown, this is:
https://config-server-3007518e-302e-4e28-be3a-f516e7b2a4fe.apps.example.com
Accessing endpoints
You can access an Actuator endpoint on the service instance backing app by appending the path /actuator/ENDPOINT
to the URL of the service instance backing app, where ENDPOINT
is the ID of the endpoint. To view the output of the health
endpoint, append /actuator/health
to the backing app URL. The following example uses cURL to make the request:
$ curl https://config-server-a5782192-8036-4f57-8312-4756a2604240.apps.example.com/actuator/health
Given an unauthenticated request, the health
endpoint displays only summary health information. You can use the cf oauth-token
command to obtain an OAuth 2.0 token for use in making an authenticated request to this endpoint:
$ curl -H "Authorization: $(cf oauth-token)" https://config-server-a5782192-8036-4f57-8312-4756a2604240.apps.example.com/actuator/health
Content feedback and comments