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 upnegative values with irate #1287
Comments
This comment has been minimized.
This comment has been minimized.
|
You've got a subtraction in there, so it's not the irate that's going negative. Can you share the raw values and timestamps around the artifact? |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil sure, whats the best way to do this? |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
i also try to get the values from the api |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil here are the api responce for the specific time frame |
This comment has been minimized.
This comment has been minimized.
|
There's something very odd in the data (all values exactly 10s apart):
Somehow every 3rd scrape is getting the same value, and it's increase is in the first two of the triplet. Are you using a node exporter that includes prometheus/node_exporter#177 ? Why do some of the results not have an instance label? |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil i removed the instance label (policy...), no this commit is not included i use the last released version 0.12.0rc1 hm 10s, i useed step=10s in the api call, without i got an error this is the call curl -g 'http://10.61.112.227:9090/api/v1/query_range?query=node_cpu{cluster="test",mode="idle"}&start=2016-01-03T16:10:00.781Z&end=2016-01-03T16:15:00.781Z&step=10s' > raw_values.json |
This comment has been minimized.
This comment has been minimized.
That's bad practice, a given metric should all have the same set of labels and may be causing some of your problems.
Ah, please use the |
This comment has been minimized.
This comment has been minimized.
|
i only removed the instance label in the provided data. hm if i do a query against the query endpoint, how can i specify a timeframe? |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil |
This comment has been minimized.
This comment has been minimized.
|
I need |
This comment has been minimized.
This comment has been minimized.
|
raw_data3.zip |
This comment has been minimized.
This comment has been minimized.
|
Can you give me the same, but a minute later? I want to get some data points after the problem.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I think what happened was that your Prometheus server got paused or overloaded for ~5s, and that messed up the timestamps. |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil ok if this happend , is the impact correct? I mean are negative values the correct answer for this? |
This comment has been minimized.
This comment has been minimized.
|
The data that we ended up with was that there was 19s of idle time in 15s, so a negative answer is what comes out. There's always race conditions that can cause oddness (there's a few smaller ones in your data too), when things get overloaded there's not much we can do I'm afraid. |
brian-brazil
closed this
Jan 6, 2016
brian-brazil
added
the
question
label
Jan 6, 2016
This comment has been minimized.
This comment has been minimized.
|
hm i do not thin the prometheus system (rkt container) was overloaded, the cpu usage was 10% and more than 50GB Memory are free, not much disk activity in this timeframe |
This comment has been minimized.
This comment has been minimized.
|
Can you check the prometheus server logs? Also what were the results of the |
This comment has been minimized.
This comment has been minimized.
|
The timestamp consistency indicates that there were no scrape failures. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 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. |

f0 commentedJan 6, 2016
Hi,
i use this query to get the cpu utilisation (from http://www.robustperception.io/understanding-machine-cpu-usage/ )
with this query i got negative values in my graphs

if i change irate to rate , the negative values are gone
the metric source is a node_exporter
i think negative values should never happen with cpu usage....