Skip to main content

Overview

When a DAG failure alert fires, OpenSRE queries your Airflow REST API for the failing DAG run, task instances, and logs — then folds that evidence into the RCA pipeline alongside metrics and logs from your observability integrations. It supports:
  • DAG run inspection
  • Task instance retrieval
  • Failure detection
  • Evidence collection for RCA generation
This integration is designed for incident-driven workflows, where an alert referencing a DAG triggers an investigation.

Prerequisites

  • A reachable Airflow REST API (Airflow 2.x /api/v1)
  • Network access from the OpenSRE environment
  • Auth: token (AIRFLOW_AUTH_TOKEN) or basic auth (AIRFLOW_USERNAME / AIRFLOW_PASSWORD)

Setup

There is no dedicated opensre integrations setup airflow wizard today. Configure via environment variables or the persistent store.

Option 1: Environment variables

Option 2: Persistent store

Local smoke setup

Start Airflow locally:
Create a failing DAG:
Trigger the DAG:
Then investigate with an alert that references the DAG:
Example alert payload:

Credentials

Provide either AIRFLOW_AUTH_TOKEN or AIRFLOW_USERNAME + AIRFLOW_PASSWORD. Prefer a dedicated read-only Airflow user for investigations.

Investigation tools

These tools use the Airflow REST API via integrations/airflow. When source = airflow, the planner seeds Airflow tools into the action space; exact tool selection remains LLM-driven. Related (Tracer, not Airflow API): get_airflow_metrics pulls orchestration metrics from Tracer when a trace_id is available — see Tracer.

Behavior notes

  • Per-run failures are isolated — one failing request does not break the loop
  • Network/API errors are handled defensively; partial evidence is preserved when possible
  • Planner routing is probabilistic (LLM-based); there is no hard-coded Airflow bypass

Verify

There is no dedicated opensre integrations verify airflow target today. Confirm auth with a live investigation or by calling the Airflow API (GET /dags) from the same environment.

Tests

Expected:
Routing coverage (if present in your checkout):

Troubleshooting

Limitations

  • Requires a reachable Airflow instance
  • No CI-backed Airflow instance by default (local validation required)
  • No setup/verify CLI wiring yet

Security

  • Prefer a dedicated read-only Airflow account over admin credentials
  • Enable TLS verification in production (AIRFLOW_VERIFY_SSL=true)
  • Store tokens/passwords in .env or the integration store — not in source control