Configuring Health Checks
Bindplane has several health check endpoints. These endpoints are useful for monitoring the status of Bindplane and its dependencies.
Requests to the status endpoints should be made at most every 60 seconds. The health checks perform internal logic that may be expensive. Do not use them for high-frequency checks, such as Kubernetes probes or load balancer health checks.
You can use the unauthorized /health
endpoint to determine if the service is running. This endpoint does not require authentication and is safe to call frequently. The /health
endpoint is always available and does not require configuration.
Configuration
Advanced health checks are disabled by default. To enable them, you must configure an API key in the Bindplane configuration file. This key is used to authenticate requests to the health check endpoints. The key should be a UUID generated using a tool like uuidgen
. This is necessary because the health check endpoints are potentially expensive as they check the status of multiple services.
Linux
Add the following section to the configuration file at /etc/bindplane/config.yaml
. The value for keys
should be generated using the uuidgen
command.
status:
enabled: true
keys:
- <your uuid>
Restart the service with sudo systemctl restart bindplane
.
Kubernetes
If using the Helm chart, set the following extraEnv
values. Use a UUID generated with uuidgen
.
- name: BINDPLANE_STATUS_ENABLED
value: 'true'
- name: BINDPLANE_STATUS_KEYS
value: '<your uuid>'
Alternatively, you can store the status key in a kube secret and reference it.
- name: BINDPLANE_STATUS_ENABLED
value: 'true'
- name: BINDPLANE_STATUS_KEYS
valueFrom:
secretKeyRef:
name: bindplane-status-key
key: status-key
Once configured, update your deployment using helm upgrade
.
Using the Health Check Endpoint
Once enabled, you can interact with the health check endpoint using curl
. The /status/v1/health
endpoint checks the following components:
PostgreSQL
Event Bus
Prometheus
Transform Agent
Example request:
curl -k -v \
-H 'X-Bindplane-Statuscheck-Key: 735d47f0-1c4c-421d-8b56-381b4351c7d3' \
https://my-bindplane.corp/status/v1/health
You can check specific services using the following endpoints:
/status/v1/health/store
(PostgreSQL)/status/v1/health/prometheus
/status/v1/health/transform-agent
/status/v1health/eventbus
All endpoints will return 200 OK
if the component is healthy.
Last updated
Was this helpful?