Skip to main content
Version: v4.10

Sidecar Health Monitoring

The sidecar instances exposes an HTTP route /health on port 9000 for health monitoring from Load Balancers and container orchestrators. It can be accessed calling the endpoint http://<instance-address>:9000/health. This route observes the health of the internal processes and returns a proper HTTP response code and a JSON blob containing extra information on the status of each of the sidecar services.

It is important to notice that the health monitoring refers to a single sidecar instance. As a single sidecar can be composed of multiple computing instances, all of them must be monitored in order to guarantee the health of a sidecar.

The JSON blob returned by the /health route is the following:

{
"status":"degraded",
"components": {
"alerter": {
"status":"healthy"
},
"mysql-wire": {
"status": "degraded",
"error": "service is initializing",
},
...
},
"timestamp":"0001-01-01T00:00:00Z"
}

The top-level status can be one of the following:

Sidecar Instance StatusHTTP Response CodeDescription
healthy200All the monitored components in the instance are working properly and the it can receive requests normally.
degraded200Some services in the instance are not working, but it should be able to accept connections without issues if resiliency mode is active.
unhealthy503Not able to accept connections.
unknown 503Instance components are yet to be tested.

Each components object status can be one the following:

Component StatusDescription
healthyComponent is working as expected.
degradedComponent is not working as expected, but the error is not critical to the sidecar instance functionality.
unhealthyComponent is not working as expected and error is critical to the sidecar instance functionality.

As shown in the example JSON, when the component status is not healthy the status message will be accompanied by an error field containing more details.

Health API

The Cyral API also allows you to query for the health of a specific sidecar cluster. The query will return a JSON object in the following format:

{
"status": "HEALTHY"
}

The status in this result will be one of the following:

StatusMeaning
HEALTHYAll instances in that sidecar cluster are healthy
UNHEALTHYAll instances in that sidecar cluster are unhealthy, or the sidecar has no instances and has been deployed previously
UNKNOWNThere was never an instance in this sidecar cluster
DEGRADEDThere is a mix of healthy, unhealthy and degraded instances in this sidecar cluster