{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/1287","labels_url":"https://api.github.com/repos/prometheus/prometheus/issues/1287/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/1287/comments","events_url":"https://api.github.com/repos/prometheus/prometheus/issues/1287/events","html_url":"https://github.com/prometheus/prometheus/issues/1287","id":125141179,"number":1287,"title":"negative values with irate","user":{"login":"f0","id":1117435,"avatar_url":"https://avatars.githubusercontent.com/u/1117435?v=3","gravatar_id":"","url":"https://api.github.com/users/f0","html_url":"https://github.com/f0","followers_url":"https://api.github.com/users/f0/followers","following_url":"https://api.github.com/users/f0/following{/other_user}","gists_url":"https://api.github.com/users/f0/gists{/gist_id}","starred_url":"https://api.github.com/users/f0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f0/subscriptions","organizations_url":"https://api.github.com/users/f0/orgs","repos_url":"https://api.github.com/users/f0/repos","events_url":"https://api.github.com/users/f0/events{/privacy}","received_events_url":"https://api.github.com/users/f0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-01-06T09:28:32Z","updated_at":"2016-01-06T11:53:18Z","closed_at":null,"body":"Hi,\r\n\r\ni use  this query to get the cpu utilisation  (from http://www.robustperception.io/understanding-machine-cpu-usage/ )\r\n```\r\n100 - (avg by (instance) (irate(node_cpu{cluster=\"test\",mode=\"idle\"}[5m])) * 100)\r\n```\r\nwith this query i got negative values in my graphs  \r\n![negative_values](https://cloud.githubusercontent.com/assets/1117435/12139333/15d6f054-b460-11e5-8503-97f334d609d9.png)\r\n\r\nif i change irate to rate , the negative values are gone\r\n\r\nthe metric source is a node_exporter\r\n\r\ni think negative values should never happen with cpu usage.... \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/comments/169307350","html_url":"https://github.com/prometheus/prometheus/issues/1287#issuecomment-169307350","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/1287","id":169307350,"user":{"login":"brian-brazil","id":7115638,"avatar_url":"https://avatars.githubusercontent.com/u/7115638?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-brazil","html_url":"https://github.com/brian-brazil","followers_url":"https://api.github.com/users/brian-brazil/followers","following_url":"https://api.github.com/users/brian-brazil/following{/other_user}","gists_url":"https://api.github.com/users/brian-brazil/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-brazil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-brazil/subscriptions","organizations_url":"https://api.github.com/users/brian-brazil/orgs","repos_url":"https://api.github.com/users/brian-brazil/repos","events_url":"https://api.github.com/users/brian-brazil/events{/privacy}","received_events_url":"https://api.github.com/users/brian-brazil/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T11:53:18Z","updated_at":"2016-01-06T11:53:18Z","body":"I think what happened was that your Prometheus server got paused or overloaded for ~5s, and that messed up the timestamps."}}