liveBook · Manning

Grafana

As explained in Data Pipelines with Apache Airflow, Second Edition

Grafana is an open-source observability platform for querying, visualizing, and monitoring data from multiple sources.

When an Airflow deployment needs an operational view, Grafana turns collected metrics into dashboards for quickly understanding system behavior. A typical pipeline sends Airflow metrics through StatsD, translates them with a Prometheus StatsD exporter, stores them in Prometheus, and visualizes them in Grafana. section 15.7.1 section 15.7.4

A practical Grafana monitoring setup involves these steps:

  • Run Grafana, for example with Docker, and open its local interface at port 3000. section 15.7.4
  • Add Prometheus as a Grafana data source and provide its URL, such as http://localhost:9090 in a local setup. section 15.7.4
  • Create a dashboard panel and query a Prometheus metric such as airflow_dag_processing_total_parse_time. section 15.7.4
  • Interpret the resulting graph for changes or spikes that may indicate added DAG files, scheduler problems, or a problematic DAG file. section 15.7.4

Visualizing Airflow DAG-processing time

Start Grafana with `docker run -d -p 3000:3000 grafana/grafana`. Configure Prometheus as the data source at `http://localhost:9090`, create a dashboard panel, and query `airflow_dag_processing_total_parse_time`. The graph shows the seconds required to process all DAGs; a large spike can signal scheduler or DAG-file trouble. section 15.7.4

How Data Pipelines with Apache Airflow, Second Edition covers it

How deep it goes
Demonstrates setup, data-source configuration, dashboard creation, querying, and monitoring delays, but not dashboard alerting configuration.
Examples
Uses a Docker launch command, a Prometheus data source, and the Airflow DAG parse-time metric.
What it assumes
Assumes Airflow metrics and Prometheus are available, with an intermediary exporter when Airflow emits StatsD metrics.
What you can do after
Operate/configure Grafana to connect Prometheus and build a dashboard for Airflow metrics.
How it connects
Connects Grafana with Airflow, StatsD, Prometheus, the Prometheus StatsD exporter, and time-series monitoring.

Also explained in

Compare how 9 books explain Grafana →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Pipelines with Apache Airflow, Second Edition. The section links point to the parts of the book it draws on.