Which Airflow component is responsible for exposing metrics to Prometheus?
Think about which Airflow service handles HTTP requests and UI.
The Airflow Webserver exposes metrics on a Prometheus endpoint, allowing Prometheus to scrape metrics. The Scheduler and Workers do not expose metrics directly, and the Metadata Database does not export metrics.
What is the expected output when you curl the Airflow Webserver's Prometheus metrics endpoint /metrics?
curl http://localhost:8080/metricsThe metrics endpoint provides Prometheus formatted metrics about Airflow components.
The Airflow Webserver's /metrics endpoint exposes metrics like scheduler heartbeat as gauges. Option A shows a valid Prometheus metric output. Option A is a 404 error which means the endpoint is missing. Option A shows task duration histogram which is not exposed by default. Option A is a connection error.
Which configuration change is required in airflow.cfg to enable Prometheus metrics on the Airflow Webserver?
Look for the correct section and keys related to metrics export.
The correct configuration to enable Prometheus metrics is under the [metrics] section with keys 'enabled = True' and 'exporter = prometheus'. Other options either use wrong keys or sections.
You configured Airflow to expose Prometheus metrics, but Prometheus shows no data for Airflow targets. What is the most likely cause?
Check network connectivity and service status first.
If Prometheus shows no data, the most common cause is that the Airflow Webserver is down or unreachable on the metrics port. Prometheus scrapes the Webserver, not the Metadata DB or Workers. Airflow does not push metrics to a push gateway by default.
Order the steps correctly to set up Airflow metrics monitoring with Prometheus and Grafana.
Think about enabling metrics first, then scraping, then visualization setup.
First, enable metrics in Airflow and restart the Webserver. Second, configure Prometheus to scrape those metrics. Third, deploy Grafana and add Prometheus as data source. Finally, import or create dashboards to visualize the metrics.