Health Check
⚠️⚠️⚠️ Warning ⚠️⚠️⚠️
The check_collector_pipeline feature of this extension is not working as expected. It
is recommended to not use the feature. The work to add a new version of the healthcheck extension
that relies on individual component status is in progress. To avoid breaking backwards compatibility,
the configuration will not be changed until the new extension is available as a replacement for this
one. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11780 for more
details.
Health Check extension enables an HTTP url that can be probed to check the
status of the OpenTelemetry Collector. This extension can be used as a
liveness and/or readiness probe on Kubernetes.
The following settings are available:
endpoint (default = localhost:13133): Address to publish the health check status. You can review the full list of ServerConfig. See our security best practices doc to understand how to set the endpoint in different environments.
path (default = "/"): Specifies the path to be configured for the health check server.
response_body (default = {}): Specifies a static body that overrides the default response returned by the health check service.
response_body::healthy: Specifies the body returned when service is healthy.
response_body::unhealthy: Specifies the body returned when service is unhealthy.
Example:
extensions:
health_check:
health_check/1:
endpoint: "localhost:13"
tls:
ca_file: "/path/to/ca.crt"
cert_file: "/path/to/cert.crt"
key_file: "/path/to/key.key"
path: "/health/status"
response_body:
healthy: I'm good
unhealthy: I'm bad!
The full list of settings exposed for this exporter is documented in config.go
with detailed sample configurations in testdata/config.yaml.