Airflow 2.0 does not send metrics to statsD when Scheduler is run with Daemon mode
See original GitHub issueApache Airflow version: 2.0.0
Environment:
- OS (e.g. from /etc/os-release): Ubuntu 20.04 LTS
- Python version: 3.8
- Kernel (e.g.
uname -a
): x86_64 x86_64 x86_64 GNU/Linux 5.4.0-58-generic #64-Ubuntu - Install tools: pip
What happened:
Airflow 2.0 does not send metrics to statsD.
I configure Airflow with official documentation (https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/metrics.html) and by this article https://dstan.medium.com/run-airflow-statsd-grafana-locally-16b372c86524 (but I used port 8125).
I turned on statsD:
statsd_on = True
statsd_host = localhost
statsd_port = 8125
statsd_prefix = airflow
But I do not see airflow metrics at http://localhost:9102/metrics (statsD metrics endpoint).
P.S. I noticed this error just using Airflow 2.0. In version 1.10.13 everything is ok in the same environment.
Thank you for advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
[GitHub] [airflow] ankxyz commented on issue #13741: Airflow 2.0 ...
... commented on issue #13741: Airflow 2.0 does not send metrics to statsD ... the problem arises just if I run `airflow scheduler`...
Read more >Configuration Reference — Airflow ... - Apache Airflow
Configuration Reference¶. This page contains the list of all the available Airflow configurations that you can set in airflow.cfg file or using environment ......
Read more >Metrics — Airflow Documentation - Apache Airflow
Airflow can be set up to send metrics to StatsD. Setup¶. First you must install StatsD requirement: pip install 'apache-airflow[statsd]'.
Read more >Configuration Reference — Airflow ... - Apache Airflow
New in version 1.10.6. If you want to avoid sending all the available metrics to StatsD, you can configure an allow list of...
Read more >Metrics — Airflow Documentation
Airflow can be set up to send metrics to StatsD. ... prefixes to send only the metrics that start with the elements of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@potiuk Of course. Moreover, I generated
airflow.cfg
from scratch to test it.Сlarification (recently noticed): the problem arises just if I run
airflow scheduler
in daemon mode:If I start it normally (without param -D) or using nohup - everything ok:
So I have the problem just with daemon mode.
Oh yes, daemon mode will close all open files and sockets.