-
What Grafana version and what operating system are you using?
-
What are you trying to achieve? Create alerts for thresholds exceeded for CPU Utilization per process on linux server (multi-core cpu) using process_exporter
-
How are you trying to achieve it? Tried to write a PROMQL Query using namedprocess_namegroup_cpu_seconds_total
-
What happened? Unable to write a query successfully.
-
What did you expect to happen?
-
Can you copy/paste the configuration(s) that you are having problems with?
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
-
Did you follow any online instructions? If so, what is the URL? Could not find many resources on the topic.
Hi,
can you share more about your metric? Is this metric namedprocess_namegroup_cpu_seconds_total
what you should be using? With NodeExporter you would use something like:
sum(rate(cpu_seconds_total{}[5m])) by (instance)
so I guess you could use something like:
sum(rate(namedprocess_namegroup_cpu_seconds_total[5m])) by (process_name)
if you have process_name
label?
This is for process exporter not node exporter
so I guess you could use something like:
sum(rate(namedprocess_namegroup_cpu_seconds_total[5m])) by (process_name)
if you haveprocess_name
label?’
Without any more info it will be hard to tell - do you have a label that represents the process name? I guess the method doesn’t change because the metric name and gathering isn’t changed either.
Have you tried adjusting the query to use rate named process name group CPU seconds total [1m] for CPU usage per process? That should help smooth out the data over time for better alerts.