[prometheus-users] Rate interval

2021-07-05 Thread Cht G
How can we choose the $__interval in the rate function like 1m, 5m, 1h, 7d... for SLI dashboards on Grafana. -- 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

Re: [prometheus-users] Rate()

2021-04-21 Thread Bjoern Rabenstein
On 13.04.21 19:35, Mohan Nagandlla wrote: > Hi team > May I know that how the rate() function will work.i just need to calculate > the container_cpu_usage_ in CPU cores when I am using it I am > getting exact core values in a rate. I want to do it manually so may I know > the calculation or

[prometheus-users] Rate()

2021-04-13 Thread Mohan Nagandlla
Hi team May I know that how the rate() function will work.i just need to calculate the container_cpu_usage_ in CPU cores when I am using it I am getting exact core values in a rate. I want to do it manually so may I know the calculation or how this rate works? -- You received this message

[prometheus-users] Rate per min

2020-11-03 Thread Arjun
Hello everyone, If I have a counter that is counting the number of incoming http requests for a service, what would be the right way to get the rate per min? I have two options: sum(rate(http_counter[1m])) by (status_code) * 60 OR sum(rate(http_counter[1m])) by (status_code) Basically, I wa

Re: [prometheus-users] Rate function is misbehaving

2020-08-21 Thread 'Eduard Feliu' via Prometheus Users
Hi Ben, it is effectively a counter reset, your indications helped me on the resolution. Thank you so much for your time! On Fri, 21 Aug 2020 at 12:48, Ben Kochie wrote: > That is not the raw data tho, it's impossible to tell without the raw > range vector query I mentioned. What you're seeing i

Re: [prometheus-users] Rate function is misbehaving

2020-08-21 Thread Ben Kochie
That is not the raw data tho, it's impossible to tell without the raw range vector query I mentioned. What you're seeing is 1 second steps, which Prometheus allows in the query because of the way the evaluation model. Also note that your graph view is 4 minutes wide, and your range is 2 minutes. T

Re: [prometheus-users] Rate function is misbehaving

2020-08-21 Thread 'Eduard Feliu' via Prometheus Users
Hi Ben, the funny thing is that if you look at the raw request you will see that there is no decrement there. So, it should not be treated in any case as a counter reset. On Fri, 21 Aug 2020 at 10:08, Ben Kochie wrote: > I haven't looked over the whole value list, but this definitely sounds >

Re: [prometheus-users] Rate function is misbehaving

2020-08-21 Thread Ben Kochie
I haven't looked over the whole value list, but this definitely sounds like a small counter jump backwards. This triggers a reset. If you query for nginx_ingress_controller_requests {...}[10m] from the console view, you will see the raw sample data in Prometheus. Also, if you swap rate() for deri

[prometheus-users] Rate function is misbehaving

2020-08-21 Thread 'Eduard Feliu' via Prometheus Users
*What did you do?* I queried the following metric: sum(rate(nginx_ingress_controller_requests{account="",exported_namespace="x",ingress=~"x.*"}[2m])) *What did you expect to see?* I expect to see a rate of 24/25 request per seconds given the raw values of the counter metric. *What

[prometheus-users] rate/increase function gives unexpected spike

2020-08-13 Thread Johny
There is one data point in series where rate/irate/increase gives an unexpected spike. underlying series has 2 points with a small increase. *timeseries irate=irate(series[1m]) *12:15:00 300,000 12:14:58400,000 12:14:50

Re: [prometheus-users] Rate query showing some gaps in data

2020-07-10 Thread Ben Kochie
You are zoomed in to where the resolution of each point on the graph is 1 second. When you are graphing data, Prometheus has to look back the time range of your range vector [1m]. The data points needed for where your graph show a gap are actually outside the window of what you are showing for the

[prometheus-users] Rate query showing some gaps in data

2020-07-10 Thread Anoop
Hi, I have configured a job in Prometheus with 30s as scrape interval. When I am checking the query with rate function, I can see some gaps in the query. The rate interval for the query is [1m]. Please find the below screenshots to understand the issue. In this case, I executed the query for the

[prometheus-users] rate() doesn't work

2020-04-28 Thread Isabel Noronha
Query1.sum by(container_label_com_docker_swarm_service_name)(container_network_transmit_bytes_total{{image!="",container_label_com_docker_swarm_service_name="$service"}) Query2.sort_desc(sum by (container_label_com_docker_swarm_service_name) (rate(container_network_transmit_bytes_total{image!=""

Re: [prometheus-users] Rate function gives wrong value when data is present.

2020-04-13 Thread Ben Kochie
That seems pretty normal to me. You have to remember, that by specifying a [1h] rate, you are asking Prometheus to look back a full hour from each point on the graph. Your graph window is only 2 hours wide, and the step is 28 seconds. So each point has 59:32 overlap backwards in time. If you want

Re: [prometheus-users] Rate function gives wrong value when data is present.

2020-04-13 Thread Shubham Choudhary
Hi, I have attached the data in *prometheus_rate_1h.txt.* *Also, see the graph.* [image: promethesu-rate-1hr.png] On Tuesday, April 14, 2020 at 12:30:58 AM UTC+5:30, Julien Pivotto wrote: > > On 13 Apr 11:56, Shubham Choudhary wrote: > > I am using the Prometheus recording rule to capture t

Re: [prometheus-users] Rate function gives wrong value when data is present.

2020-04-13 Thread Julien Pivotto
On 13 Apr 11:56, Shubham Choudhary wrote: > I am using the Prometheus recording rule to capture the CPU usage over 5 > mins and later want to use it to get maximum CPU used for 5 mins in the > last 30 days. > > Recording Rule > > - expr: 1 - avg by (instance) > > (rate(node_cpu_seconds_total{m

[prometheus-users] Rate function gives wrong value when data is present.

2020-04-13 Thread Shubham Choudhary
I am using the Prometheus recording rule to capture the CPU usage over 5 mins and later want to use it to get maximum CPU used for 5 mins in the last 30 days. Recording Rule - expr: 1 - avg by (instance) > (rate(node_cpu_seconds_total{mode="idle"}[5m])) > record: instance:node_cpu_usage:rate