Skip to content

Instantly share code, notes, and snippets.

@slash-cyberpunk
Last active July 18, 2022 10:12
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slash-cyberpunk/db2ae28586567036d65d50f6317feb47 to your computer and use it in GitHub Desktop.
Save slash-cyberpunk/db2ae28586567036d65d50f6317feb47 to your computer and use it in GitHub Desktop.
Config for stasd_exporter v0.22.7 and airflow 2.3.3
mappings:
- match: "airflow.dag_processing.last_duration.*"
help: "Milliseconds taken to load the given DAG file"
observer_type: summary
name: "airflow_dag_processing_last_duration"
labels:
dag_file: "$1"
- match: "airflow.dagrun.duration.*.*"
help: "Milliseconds taken for a DagRun to reach 'type' state"
observer_type: summary
name: "airflow_dagrun_duration"
labels:
type: "$1"
dag_id: "$2"
- match: "airflow.dagrun.*.first_task_scheduling_delay"
help: "Milliseconds elapsed between first task start_date and dagrun expected start"
observer_type: summary
name: "airflow_dagrun_first_task_scheduling_delay"
labels:
dag_id: "$1"
- match: "airflow.collect_db_dags"
help: "Milliseconds taken for fetching all Serialized Dags from DB"
observer_type: summary
name: "airflow_collect_db_dags"
- match: "airflow.dagrun.dependency-check.*"
help: "Milliseconds taken to check DAG dependencies"
observer_type: summary
name: "airflow_dagrun_dependency_check"
labels:
dag_id: "$1"
- match: "airflow.dagrun.schedule_delay.*"
help: "Milliseconds of delay between the scheduled DagRun start date and the actual DagRun start date"
observer_type: summary
name: "airflow_dagrun_schedule_delay"
labels:
dag_id: "$1"
- match: "airflow.dag.*.*.duration"
help: "Milliseconds taken to finish a task"
observer_type: summary
name: "airflow_dag_duration"
labels:
dag_id: "$1"
task_id: "$2"
- match: "airflow.pool.*.*"
help: "Number of 'type' in the pool"
name: "airflow_pool"
labels:
type: "$1"
pool_name: "$2"
- match: "airflow.executor.*"
help: "Number of 'type' tasks on executor"
name: "airflow_executor"
labels:
type: "$1"
- match: "airflow.scheduler.tasks.*"
help: "Number of tasks 'status' in scheduler"
name: "airflow_scheduler_tasks"
labels:
status: "$1"
- match: "airflow.smart_sensor_operator.*"
help: "Number of tasks 'status' in the previous poking loop"
name: "airflow_smart_sensor_operator"
labels:
status: "$1"
- match: "airflow.dag_processing.last_run.seconds_ago.*"
help: "Seconds since <dag_file> was last processed"
name: "airflow_dag_processing_last_run"
labels:
dag_file: "$1"
- match: "airflow.dag_processing.last_runtime.*"
help: "Seconds spent processing <dag_file> (in most recent iteration)"
name: "airflow_dag_processing_last_runtime"
labels:
dag_file: "$1"
- match: "airflow.dag_processing.total_parse_time"
help: "Seconds taken to scan and import all DAG files once"
name: "airflow_dag_processing_total_parse_time"
- match: "airflow.dag_processing.import_errors"
help: "Number of errors from trying to parse DAG files"
name: "airflow_dag_processing_import_errors"
- match: "airflow.dagbag_size"
help: "DAG bag size"
name: "airflow_dagbag_size"
- match: 'airflow\.scheduler\.orphaned_tasks\.(cleared|adopted)'
match_type: regex
help: "Number of Orphaned tasks cleared or adopted by the Scheduler"
name: "airflow_scheduler_orphaned_tasks"
labels:
status: "$1"
- match: "airflow.scheduler.critical_section_busy"
help: "Count of times a scheduler process tried to get a lock on the critical section (needed to send tasks to the executor) and found it locked by another process."
name: "airflow_scheduler_critical_section_busy"
- match: "airflow.sla_email_notification_failure"
help: "Number of failed SLA miss email notification attempts"
name: "airflow_sla_email_notification_failure"
- match: 'ti\.(start|finish)\.(.+)\.(.+)'
match_type: regex
help: "Number of started or completed task in a given dag. Similar to airflow_jobs but for task"
name: "airflow_taskinstance"
labels:
status: "$1"
dag_id: "$2"
task_id: "$3"
- match: "airflow.dag.callback_exceptions"
help: "Number of exceptions raised from DAG callbacks. When this happens, it means DAG callback is not working."
name: "airflow_dag_callback_exceptions"
- match: "airflow.celery.task_timeout_error"
help: "Number of AirflowTaskTimeout errors raised when publishing Task to Celery Broker."
name: "airflow_celery_task_timeout_error"
- match: 'task_(removed|restored)_(from|to)_dag\.(.+)'
match_type: regex
help: "Number of tasks removed or restored for a given dag"
name: "airflow_tasks_dag"
labels:
status: "$1"
dag_id: "$3"
- match: 'airflow\.task_instance_created-(.+)'
match_type: regex
help: "Number of tasks instances created for a given Operator"
name: "airflow_taskinstance_created"
- match: "airflow.dag_processing.processes"
help: "Number of currently running DAG parsing processes"
name: "airflow_dag_processing_processes"
- match: "airflow.dag_processing.manager_stalls"
help: "Number of stalled DagFileProcessorManager"
name: "airflow_dag_processing_manager_stalls"
- match: "airflow.dag_file_refresh_error"
help: "Number of failures loading any DAG files"
name: "airflow_dag_file_refresh_error"
- match: "airflow.scheduler_heartbeat"
help: "Scheduler heartbeats"
name: "airflow_scheduler_heartbeat"
- match: "airflow.zombies_killed"
help: "Zombie tasks killed"
name: "airflow_zombies_killed"
- match: "airflow.previously_succeeded"
help: "Number of previously succeeded task instances"
name: "airflow_previously_succeeded"
- match: 'airflow\.ti_(failures|successes)'
match_type: regex
help: "Overall task instances 'type'"
name: "airflow_task_instances"
labels:
type: "$1"
- match: 'airflow\.operator_(failures|successes)_(.+$)'
match_type: regex
help: "Operator status"
name: "airflow_operators"
labels:
status: "$1"
operator_name: "$2"
- match: 'airflow\.(.+)_(start|end|heartbeat_failure)$'
match_type: regex
help: "Number of status jobs"
name: "airflow_jobs"
labels:
status: "$2"
job_name: "$1"
- match: .
match_type: regex
action: drop
name: "dropped"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment