/ready
Get API readiness data for your Sensu instance
The /ready API endpoint provides HTTP GET access to information about whether your Sensu instance is ready to serve API requests.
Example
The following example demonstrates a GET request to the /ready API endpoint:
curl -X GET \
http://127.0.0.1:8080/readyThe request results in a successful HTTP/1.1 200 OK response and a text response body:
readyIf the backend configuration includes an api-serve-wait-time duration, the request will result in an HTTP/1.1 503 Service Unavailable response.
Until the api-serve-wait-time duration expires, the text response body will state that the API is unavailable:
API unavailable during startup.
See api-serve-wait-time settings.NOTE: 503 Service Unavailable responses include a Retry-After header that lists the specified api-serve-wait-time duration.
API Specification
| /ready (GET) | |
|---|---|
| description | Returns information about whether the Sensu instance is ready to serve API requests. |
| example url | http://hostname:8080/ready |
| response type | text |
| response codes |
|
| output | 200 (OK):503 (Service Unavailable): |
Get agent connection readiness data for your Sensu instance
The /ready agent transport API endpoint provides HTTP GET access to information about whether your Sensu agent transport is ready to accept agent WebSocket connections.
Example
The following example demonstrates a GET request to the backend agent transport /ready endpoint using the default agent listener port 8081:
curl -X GET \
http://127.0.0.1:8081/readyThe request results in a successful HTTP/1.1 200 OK response and a text response body:
readyIf the backend configuration includes an agent-serve-wait-time duration, the request will result in an HTTP/1.1 503 Service Unavailable response.
Until the agent-serve-wait-time duration expires, the text response body will state that agentd is unavailable:
agentd temporarily unavailable during startupNOTE: 503 Service Unavailable responses include a Retry-After header that lists the specified agent-serve-wait-time duration.
API Specification
| /ready (GET) | |
|---|---|
| description | Returns information about whether the Sensu instance is ready to accept agent connections. |
| example url | http://hostname:8081/ready |
| response type | text |
| response codes |
|
| output | 200 (OK):503 (Service Unavailable): |