Area: Observability
Sub-Area: System Monitoring
Applies to: OSS
Issue
You want more than a simple up or down check from the /health endpoint. You want component status and performance metrics for monitoring and alerting on a self-hosted DataHub.
You Might Be Asking
- Are there health check endpoints beyond
/health? - How can I get detailed metrics about DataHub's internal components?
- How do I send DataHub metrics to an external monitoring system?
- I use DataHub Cloud. Can I scrape these endpoints?
Cause
Self-hosted DataHub has more monitoring options than a single /health check. The JMX exporter needs ENABLE_PROMETHEUS=true. The Micrometer endpoint is on by default in the Docker images. The frontend and GMS each have their own health endpoints.
Solution
1. Export Prometheus metrics
-
JMX exporter: Set
ENABLE_PROMETHEUS=truefor GMS and the MAE/MCE consumers. This enables the JMX exporter agent. The example compose file scrapes port4318. -
Micrometer: The Docker images for GMS, the MAE/MCE consumers and the frontend set
MANAGEMENT_SERVER_PORTto4319by default. You don't need to change anything. Scrapehttp://<container>:4319/actuator/prometheus.
See Monitoring DataHub.
2. Check GMS health
In the latest OSS source, GMS exposes these endpoints. Which ones are available depends on your server version.
| Endpoint | Returns |
|---|---|
GET /health |
200 with an empty body once bootstrap is complete. 503 while bootstrapping or shutting down. |
GET /health/live |
Always 200. |
GET /health/detailed |
200 with JSON: bootstrapped, elasticsearch, elasticsearch_detail, ready, timestamp. |
GET /check/ready |
A Boolean. |
GET /debug/ready |
Per-component results. The checks parameter defaults to elasticsearch. Returns 503 if any component is unhealthy. |
GET /check/elastic |
A Boolean for Elasticsearch health. |
GET /debug/elastic |
Detailed Elasticsearch health. |
GMS serves /health, /health/live, /health/detailed and /actuator/prometheus without authentication. The /check/* and /debug/* endpoints are not on that list.
3. Check frontend health
The frontend on port 9002 returns 200 GOOD from GET /admin and GET /health, or 503 during graceful shutdown. Both are deprecated for health checks and do not call GMS. Use the management listener on port 4319 instead:
-
GET /health/live: the process is up. -
GET /health/ready:200when the frontend has started, is not shutting down and is not saturated. Otherwise503withStarting,Shutting downorSaturated.
4. Read ingestion run status through GraphQL
listIngestionSources requires an input argument (ListIngestionSourcesInput!) with start, count and query. On each ingestion source, executions(start, count) returns start, count, total and executionRequests. Each execution request has a result with status, startTimeMs and durationMs. Select the fields like this inside each source:
executions(start: 0, count: 5) {
total
executionRequests {
result {
status
startTimeMs
durationMs
}
}
}
See the GraphQL API overview.
DataHub Cloud
DataHub operates the Cloud deployment. You can't set ENABLE_PROMETHEUS or scrape the GMS and frontend containers. For monitoring questions on Cloud, contact DataHub Support.
Related Documentation
Tags: health-check, monitoring, observability, metrics, health-endpoint, system-health, apm, operational-insights