Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No datapoints found." using rate on node_cpu #1428

Closed
pwaller opened this Issue Feb 26, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@pwaller
Copy link

pwaller commented Feb 26, 2016

prometheus, version 0.16.2 (branch: stable, revision: 287d9b2)
  build user:       @ee15eaddc546
  build date:       20160223-19:12:50
  go version:       1.5.3

I'm pretty convinced everything is working, except that I can't get the rate() function to work. Here I pick a specific node_cpu and try and try and compute the rate:

screenshot from 2016-02-26 10 40 47

And the rate:

screenshot from 2016-02-26 10 41 10

Am I doing something obviously wrong? I found #1022 but checking the clocks from the host running prometheus, the prometheus container and my browser and they all agree to within a second.

rate(node_cpu[1m]) also returns no data, whereas node_cpu by itself returns lots of data.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 26, 2016

Eyeballing that data, you have a scrape interval of 1m so rate(node_cpu[1m]) will often not have two data points to work with. I'd suggest using rate(node_cpu[5m]) instead.

@pwaller

This comment has been minimized.

Copy link
Author

pwaller commented Feb 26, 2016

I think I'm coming to understand the problem. I thought I had a 1s scrape interval, but my scrape interval was only applying to the first scrape config and not the later ones.

How is the default scrape interval determined? I thought it was 10s, judging from the docs?

@pwaller

This comment has been minimized.

Copy link
Author

pwaller commented Feb 26, 2016

Sorry. PEBKAC. I was reading the default scrape timeout, not the scrape interval. All solved!

The only slightly unfortunate thing was just how mysterious it was when I got no data back.

@pwaller pwaller closed this Feb 26, 2016

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 26, 2016

Glad you're sorted out.

@pwaller

This comment has been minimized.

Copy link
Author

pwaller commented Feb 26, 2016

Thanks for the exceptional response time 👍 👏

@davidlwillson

This comment has been minimized.

Copy link

davidlwillson commented Mar 27, 2018

I'll suggest that it would be cool if Prometheus could detect the problem and say something like: You're trying for every 30s, but your samples seem to be every 60s. Decrease the granularity of your report, or increase the granularity of your samples.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 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.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.