Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PID to metrics #98

Closed
domleb opened this issue May 10, 2019 · 1 comment
Closed

Add PID to metrics #98

domleb opened this issue May 10, 2019 · 1 comment

Comments

@domleb
Copy link

domleb commented May 10, 2019

I would like to monitor the threads of Nginx so we can alert when worker processes are saturated. I've enabled -threads but because all Nginx threads have the same name (nginx) in field comm(2) from /proc/[pid]/stat, I only get a single timeseries.

Could the PID (first field from proc/[pid]/stat) be added as a label?

@ncabatoff
Copy link
Owner

Hi @domleb,

I don't think using PID as a label is a good idea, because it will result in a lot of churn and high cardinality series, which Prometheus doesn't like. My plan to address your use case is #62. If you have any thoughts on that approach please feel free to add them to that issue. I'm going to close this one as a dup, because I don't plan to implement the solution you're proposing and I think both issues are trying to address the same problem, i.e. that the current breakdown by thread name isn't useful for most programs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants