Secretless Health Check

Secretless broker exposes two endpoints that can be used for readiness and liveliness checks:

Endpoints

Description

Return codes

http://<host>:5335/ready

Indicate if the broker has loaded a valid configuration.

503: The service failed

200: Service is ready

 

http://<host>:5335/live

Indicates if the broker has service connectors activated.

 

If Secretless is not provided with a configuration (e.g. it is not listening to anything), the live endpoint will also return 503.

Use the following curl to manually check the status:

 
$ # Start Secretless Broker in another terminal on the same machine

$ curl -i localhost:5335/ready
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Thu, 27 Dec 2018 17:12:07 GMT
Content-Length: 3

{}

To retrieve the full informational JSON that includes details on which checks failed and with what error, add the ?full=1 query parameter to the end of either of the available endpoints:

 
$ # Start Secretless Broker in another terminal on the same machine

$ curl -i localhost:5335/ready?full=1
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Thu, 27 Dec 2018 17:13:22 GMT
Content-Length: 45

{
    "listening": "OK",
    "ready": "OK"
}