Closed praktiskt closed 3 years ago
Thanks for opening your first issue here! Be sure to follow the issue template!
Hey @magnusfurugard, you need to use AIRFLOW__METRICS__STATSD_HOST
, not AIRFLOW__METRICS__HOST
:
https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#statsd-host
I looked and didn't see any reference to the wrong env var name in our docs. Did you see it somewhere?
If you still have issues, let me know and I can reopen this. Thanks!
I used the correct variable key and followed everything from here, still statsd_host value does not change to the one in env var.
Official Helm Chart version
1.2.0 (latest released)
Apache Airflow version
2.1.4 (latest released)
Kubernetes Version
v.1.21.2
Helm Chart configuration
Docker Image customisations
None.
What happened
Setting
AIRFLOW__METRICS__HOST
seem to have no effect, even if we setstatsd.enabled=false
in the chart and enable it through the same config (AIRFLOW__METRICS__STATSD_ON
). Airflow will continue to try to resolve the default host,<name>-statsd
-service, even if setAIRFLOW__METRICS__HOST
.What you expected to happen
I expected Airflow to honor the
AIRFLOW__METRICS__HOST
variable and resolve the service as specified there.How to reproduce
Step 1 - vanilla install
Install the helm-chart with the following
values.yml
Step 2 - Replace statsd with custom statsd
We want to disable the chart-built-in statsd and use our own instead. To accommodate, set up any statsd deployment in the same namespace. In my case, I use the prometheus exporter one but it can be absolutely anything.
... And update Airflow to communicate with the new statsd
Step 3 - Airflow fails to resolve the new host
Run any DAG from within Airflow, or restart the webserver to trigger an error, displaying that it's unable to resolve the service;
Step 4 - Rename the new statsd-service to match what Airflow is looking for
We can fix this by overriding the name of the new service to match that which we know Airflow is looking for (
<name>-statsd
).Airflow is now able to log metrics to our custom statsd-client.
And just to showcase that these variables are not picked up, let's set them to something that we know does not exist.
Airflow is still able to log metrics to our custom statsd-client.
Anything else
executor=KubernetesExecutor
, but I doubt it has any effect. Made releases and upgrades faster.<service>.<namespace>.svc.cluster.local
) does not help, it still does not resolve.Are you willing to submit PR?
Code of Conduct