rycus86 / prometheus_flask_exporter

Prometheus exporter for Flask applications
https://pypi.python.org/pypi/prometheus-flask-exporter
MIT License
646 stars 161 forks source link

Not receiving process_* in multiprocess #166

Open SyperAlexKomp opened 11 months ago

SyperAlexKomp commented 11 months ago

After setting up PROMETHEUS_MULTIPROC_DIR stopped receiving any of process data. When unsetting PROMETHEUS_MULTIPROC_DIR and using PrometheusMetrics all is working normal

rycus86 commented 11 months ago

See https://prometheus.github.io/client_python/multiprocess/

Custom collectors do not work (e.g. cpu and memory metrics)

In multiprocess mode you have more than one process, so the values wouldn't make much sense there.

SyperAlexKomp commented 11 months ago

Oh, It's bad. I just want to make uptime, memory and cpu dasboards for my site in grafna. Maybe you can recommend some ways how it's possible to do?

Mayde it's possible to send collector data all of processes? I don't know a lot about prometheus, so maybe it's stupid xD

SyperAlexKomp commented 11 months ago

So I think I found the way how to make it. But now I got another issue. Idk why, but it gaves me wrong statistic. Here is example https://omeba-work.com/screenshoot/chrome_ygxCUXosGY.png. I tried to get raw data in prometheus directly and it still return more truthful values. It's because multiprocess mode, but I don't know why