Skip to content

Instantly share code, notes, and snippets.

@naturalett
Created January 12, 2022 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naturalett/599bec225a8269ab1d8ceeab58c779f2 to your computer and use it in GitHub Desktop.
Save naturalett/599bec225a8269ab1d8ceeab58c779f2 to your computer and use it in GitHub Desktop.
airflow custom values
########################################
## CONFIG | Airflow Configs
########################################
airflow:
extraPipPackages:
- "datadog==0.42.0"
- "apache-airflow[statsd]"
config:
AIRFLOW__METRICS__STATSD_ON: true
AIRFLOW__METRICS__STATSD_HOST: "localhost"
AIRFLOW__METRICS__STATSD_PORT: "8125"
AIRFLOW__METRICS__STATSD_PREFIX: "airflow"
AIRFLOW__METRICS__STATSD_DATADOG_ENABLED: true
AIRFLOW__METRICS__STATSD_ALLOW_LIST: "executor"
AIRFLOW__METRICS__STATSD_DATADOG_TAGS: "statsd_group:datainfra,statsd_env:production"
###################################
## COMPONENT | Airflow Workers
###################################
workers:
enabled: true
replicas: 1
resources:
requests:
cpu: "800m"
memory: "3.5Gi"
autoscaling:
enabled: true
maxReplicas: 8
metrics:
- type: External
external:
metric:
name: "datadogmetric@production:running-tasks"
target:
type: AverageValue
averageValue: 1
###################################
## COMPONENT | DatadogMetric
###################################
extraManifests:
- apiVersion: datadoghq.com/v1alpha1
kind: DatadogMetric
metadata:
name: running-tasks
namespace: production
spec:
query: avg:airflow.executor.running_tasks{*}.rollup(max, 60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment