Open sumitsharma16 opened 1 year ago
Hi Team any update on this?
any update?
@sumitsharma16 Can you provide some information about your System the version you are using and past also your config file? Without this information is impossible to help you at all. Also, see writing-a-proper-github-issue.
@sumitsharma16 try use:
topk(5,(rate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance=~"$host"}[$interval])
+
rate(namedprocess_namegroup_thread_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])))
It's work for me
The OP is referencing the Grafana dashboard System Process Metrics #8378
There are 2 graphs at the top that don't work, while all of the other graphs do have data. I'm exporting from 2 clients; Ubuntu 22.04 and RHEL 7 using the following install packages on the clients:
Ubuntu 22.04: process-exporter_0.7.10_linux_amd64.deb
RHEL 7: process-exporter_0.7.10_linux_amd64.rpm
Graph 1 "Process CPU Usage" has this query
topk(5,(rate(namedprocess_namegroup_cpu_user_seconds_total{groupname=~".+",instance=~"$host"}[1m])
+
rate(namedprocess_namegroup_cpu_system_seconds_total{groupname=~".+",instance=~"$host"}[1m]))
or
(irate(namedprocess_namegroup_cpu_user_seconds_total{groupname=~".+",instance=~"$host"}[5m])
+
irate(namedprocess_namegroup_cpu_system_seconds_total{groupname=~".+",instance=~"$host"}[5m])))
topk(5,
rate(namedprocess_namegroup_cpu_system_seconds_total{groupname=~".+",instance=~"$host"}[1m])
or
(
irate(namedprocess_namegroup_cpu_system_seconds_total{groupname=~".+",instance=~"$host"}[5m])))
The namedprocess_namegroup_cpu_user_seconds_total
and namedprocess_namegroup_cpu_system_seconds_total
metrics don't exist in the output on either of my clients
> curl http://localhost:9256/metrics | grep -E 'namedprocess_namegroup_cpu_user_seconds_total|namedprocess_namegroup_cpu_system_seconds_total'
...nothing returned...
I'm using the following client side config file /etc/process-exporter/all.yaml
process_names:
- name: "{{.ExeBase}};{{.Username}}"
cmdline:
- '.+'
Could this be an issue with the client side config?
And the above client config comes from this blog: https://vimalselvam.com/post/prometheus-capturing-username-in-process-exporter/
@sumitsharma16 try use:
topk(5,(rate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance=~"$host"}[$interval]) + rate(namedprocess_namegroup_thread_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])))
It's work for me Thanks, editing the query in graph "Process CPU Usage" with your suggestion fixed it.
Now I'm on to graph 2 "Top processes by System CPU cores used"
This appears to work
topk(5,
rate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance=~"$host"}[$interval])
or
(
irate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance=~"$host"}[5m])))
Query
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])))
As checked on /metrics it is not able to find
namedprocess_namegroup_cpu_user_seconds_total namedprocess_namegroup_cpu_system_seconds_total
Screenshot FYR:
Please let us know if the metrics name is changed. I am getting all the metrics except this one.