{"action":"opened","issue":{"url":"https://api.github.com/repos/regilero/check_nginx_status/issues/13","repository_url":"https://api.github.com/repos/regilero/check_nginx_status","labels_url":"https://api.github.com/repos/regilero/check_nginx_status/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/regilero/check_nginx_status/issues/13/comments","events_url":"https://api.github.com/repos/regilero/check_nginx_status/issues/13/events","html_url":"https://github.com/regilero/check_nginx_status/issues/13","id":136347512,"number":13,"title":"Negative values when restarting nginx","user":{"login":"tatref","id":2582791,"avatar_url":"https://avatars.githubusercontent.com/u/2582791?v=3","gravatar_id":"","url":"https://api.github.com/users/tatref","html_url":"https://github.com/tatref","followers_url":"https://api.github.com/users/tatref/followers","following_url":"https://api.github.com/users/tatref/following{/other_user}","gists_url":"https://api.github.com/users/tatref/gists{/gist_id}","starred_url":"https://api.github.com/users/tatref/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatref/subscriptions","organizations_url":"https://api.github.com/users/tatref/orgs","repos_url":"https://api.github.com/users/tatref/repos","events_url":"https://api.github.com/users/tatref/events{/privacy}","received_events_url":"https://api.github.com/users/tatref/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-25T10:39:05Z","updated_at":"2016-02-25T10:39:05Z","closed_at":null,"body":"I used the latest version of the plugin.\r\n\r\nHow to reproduce:\r\n\r\n1. Run the check\r\n2. The tmp file created contains something like:\r\n`1456396233\r\n12\r\n12\r\n12`\r\n2. Restart nginx\r\n3. Re-run the check\r\n4. The tmp now contains\r\n`1456396486\r\n1\r\n1\r\n1`\r\n5. The output contains negative values:\r\n`ReqPerSec: -7.750 ConnPerSec: -7.750`\r\n\r\nThe values may be bigger, depending on the server usage. I found this out when looking at the produced graphs.\r\n\r\nI think we should check if the tmp file contains smaller values than the actual connection count, this would show a restart of nginx.\r\n\r\nWhat do you think about this ?"}}