How to get CPU usage percentage of Prometheus server itself

297 views
Skip to first unread message

abhaydd...@gmail.com

unread,
Dec 12, 2018, 2:17:35 AM12/12/18
to Prometheus Users
Hi ,

I want to get CPU usage percentage of Prometheus server.
 I am using process_cpu_seconds_total for this.
I have use rate(process_cpu_seconds_total 5m)
But it is not working.
Could somebody help me in getting CPU usage percentage of Prometheus server.

Simon Pasquier

unread,
Dec 12, 2018, 3:34:35 AM12/12/18
to abhaydd...@gmail.com, Prometheus Users
I suppose that you're missing the square brackets around the interval:
rate(process_cpu_seconds_total[5m])
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To post to this group, send email to promethe...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/b1704b28-fa7e-44b9-8311-e79de3b65291%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

abhaydd...@gmail.com

unread,
Dec 12, 2018, 4:05:03 AM12/12/18
to Prometheus Users


On Wednesday, December 12, 2018 at 2:04:35 PM UTC+5:30, Simon Pasquier wrote:
I suppose that you're missing the square brackets around the interval:
rate(process_cpu_seconds_total[5m])
On Wed, Dec 12, 2018 at 8:17 AM <abhaydd...@gmail.com> wrote:
>
> Hi ,
>
> I want to get CPU usage percentage of Prometheus server.
>  I am using process_cpu_seconds_total for this.
> I have use rate(process_cpu_seconds_total [5m])

abhaydd...@gmail.com

unread,
Dec 12, 2018, 4:06:40 AM12/12/18
to Prometheus Users
Thanks Simon 
But even after using rate(process_cpu_seconds_total[5m])  I am not getting CPU usage percentage

Simon Pasquier

unread,
Dec 12, 2018, 4:17:18 AM12/12/18
to abhaydd...@gmail.com, Prometheus Users
Does the simple query "process_cpu_seconds_total" return something?
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/11a06547-6250-4939-a0e6-74fc86e8da23%40googlegroups.com.

abhaydd...@gmail.com

unread,
Dec 12, 2018, 4:40:26 AM12/12/18
to Prometheus Users
Yes it is returning 
Reply all
Reply to author
Forward
0 new messages