Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprate()[1m] does not return any data #3194
Comments
This comment has been minimized.
This comment has been minimized.
benclapp
commented
Sep 27, 2017
•
|
This looks more like a question rather than an issue, as this is how I'd expect Prometheus to behave. Looks like you're trying to query with a rate of 1m, which is also your scrape interval. The rate and irate functions need at least two scrapes to return a result. What it sounds like you want to use could be irate over a larger range. This would only use the two most recent scrapes. E.g. irate(container_cpu_usage_seconds_total{container_name='prometheus-server',cpu='cpu00'}[5m]) |
This comment has been minimized.
This comment has been minimized.
|
Scrape interval is 1m, that's true. However, first query shows that the metrics are every 15s, so rate[1m] should work. |
This comment has been minimized.
This comment has been minimized.
benclapp
commented
Sep 28, 2017
|
Had a look at prometheus-query. It looks like the default step value is 15 seconds, which is probably why you see a 15s step in the results you posted. You'll still need to use rate() or irate() over a larger range to get the metric you're after :) |
brian-brazil
closed this
Sep 28, 2017
Miouge1
referenced this issue
Aug 2, 2018
Merged
[grafana] Rate over 2 minutes since default Prometheus interval is 1m #2884
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
krogon-dp commentedSep 20, 2017
What did you do?
What did you expect to see?
Rate of increase of the time series in the range vector.
What did you see instead? Under which circumstances?
No datapoints found.
Environment
Prometheus running on kubernetes 1.7.0 from helm chart (version stable/4.5.0).
System information:
Linux 4.4.65-k8s x86_64Prometheus version: