Live Workshop: Integrate Google SecOps with Bindplane - Join Us on February 26th at 11 AM ET!Sign Up Now

Healthcheck

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.

yaml
1status:
2  enabled: true
3  keys:
4    - <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.

yaml
1- name: BINDPLANE_STATUS_ENABLED
2  value: 'true'
3- name: BINDPLANE_STATUS_KEYS
4  value: '<your uuid>'

Alternatively, you can store the status key in a kube secret and reference it.

yaml
1- name: BINDPLANE_STATUS_ENABLED
2  value: 'true'
3- name: BINDPLANE_STATUS_KEYS
4  valueFrom:
5    secretKeyRef:
6      name: bindplane-status-key
7      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:

bash
1curl -k -v \
2 -H 'X-BindPlane-Statuscheck-Key: 735d47f0-1c4c-421d-8b56-381b4351c7d3' \
3 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.