ncabatoff / process-exporter

Prometheus exporter that mines /proc to report on selected processes
MIT License
1.72k stars 270 forks source link

Process Exporter: Unable to view CPU metrics in Grafana dashboard #217

Open vickyvikas7988 opened 2 years ago

vickyvikas7988 commented 2 years ago

I am unable to see metrics on Grafana dashboard for CPU and I am able to view for others like Memory disk IO, threads and all.

Here is the screenshot attached.

Screenshot 2021-12-03 at 3 28 11 PM

This is the expression currently used.

topk(5,(rate(namedprocess_namegroup_cpu_user_seconds_total{groupname=~"$processes",instance=~"$host"}[$interval]) + rate(namedprocess_namegroup_cpu_system_seconds_total{groupname=~"$processes",instance=~"$host"}[$interval])) or (irate(namedprocess_namegroup_cpu_user_seconds_total{groupname=~"$processes",instance=~"$host"}[5m]) + irate(namedprocess_namegroup_cpu_system_seconds_total{groupname=~"$processes",instance=~"$host"}[5m])))

Please help me how to resolve this issue.

leichongxiang commented 2 years ago

topk(5,(rate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance=~"$host"}[$interval]) + rate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance=~"$host"}[$interval])) or (irate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance=~"$host"}[5m]) + irate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance=~"$host"}[5m])))