{"action":"created","issue":{"url":"https://api.github.com/repos/varnish/varnish-nagios/issues/12","repository_url":"https://api.github.com/repos/varnish/varnish-nagios","labels_url":"https://api.github.com/repos/varnish/varnish-nagios/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/varnish/varnish-nagios/issues/12/comments","events_url":"https://api.github.com/repos/varnish/varnish-nagios/issues/12/events","html_url":"https://github.com/varnish/varnish-nagios/issues/12","id":203602123,"number":12,"title":"Varnish 4.1 MAIN.uptime should have inverted check","user":{"login":"StoneISStephan","id":5698285,"avatar_url":"https://avatars.githubusercontent.com/u/5698285?v=3","gravatar_id":"","url":"https://api.github.com/users/StoneISStephan","html_url":"https://github.com/StoneISStephan","followers_url":"https://api.github.com/users/StoneISStephan/followers","following_url":"https://api.github.com/users/StoneISStephan/following{/other_user}","gists_url":"https://api.github.com/users/StoneISStephan/gists{/gist_id}","starred_url":"https://api.github.com/users/StoneISStephan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StoneISStephan/subscriptions","organizations_url":"https://api.github.com/users/StoneISStephan/orgs","repos_url":"https://api.github.com/users/StoneISStephan/repos","events_url":"https://api.github.com/users/StoneISStephan/events{/privacy}","received_events_url":"https://api.github.com/users/StoneISStephan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-27T10:31:02Z","updated_at":"2017-01-27T10:38:52Z","closed_at":null,"body":"We want to monitor if the Varnish child has been restarted within the last hour, aka if it has been running for less than 3600 seconds.\r\nBut the check only checks if it has been running for longer than 3600 seconds.\r\n\r\nSo the check should be \"if actual value below treshold\" instead of above.\r\n\r\n```\r\n# /usr/lib/nagios/plugins/check_varnish -p MAIN.uptime -w 7200 -c 3600; echo $?\r\nVARNISH OK: Child process uptime (2,985)|MAIN.uptime=2985\r\n0\r\n```\r\n\r\nIs unexpected behaviour.\r\n\r\n\r\n\r\n\r\nWe are expecting:\r\n\r\n\r\n```\r\n# /usr/lib/nagios/plugins/check_varnish -p MAIN.uptime -w 7200 -c 3600; echo $?\r\nVARNISH CRITICAL: Child process uptime (2,985)|MAIN.uptime=2985\r\n2\r\n```"},"comment":{"url":"https://api.github.com/repos/varnish/varnish-nagios/issues/comments/275636807","html_url":"https://github.com/varnish/varnish-nagios/issues/12#issuecomment-275636807","issue_url":"https://api.github.com/repos/varnish/varnish-nagios/issues/12","id":275636807,"user":{"login":"StoneISStephan","id":5698285,"avatar_url":"https://avatars.githubusercontent.com/u/5698285?v=3","gravatar_id":"","url":"https://api.github.com/users/StoneISStephan","html_url":"https://github.com/StoneISStephan","followers_url":"https://api.github.com/users/StoneISStephan/followers","following_url":"https://api.github.com/users/StoneISStephan/following{/other_user}","gists_url":"https://api.github.com/users/StoneISStephan/gists{/gist_id}","starred_url":"https://api.github.com/users/StoneISStephan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StoneISStephan/subscriptions","organizations_url":"https://api.github.com/users/StoneISStephan/orgs","repos_url":"https://api.github.com/users/StoneISStephan/repos","events_url":"https://api.github.com/users/StoneISStephan/events{/privacy}","received_events_url":"https://api.github.com/users/StoneISStephan/received_events","type":"User","site_admin":false},"created_at":"2017-01-27T10:38:51Z","updated_at":"2017-01-27T10:38:51Z","body":"Closing this issue as self-resolved,\r\nthe documentation doesn't say it, but by reading the C-code I found that using @ in front of the value allows you to invert it.\r\n\r\n```\r\n /usr/lib/nagios/plugins/check_varnish -p MAIN.uptime -w @10000 -c @5000; echo $?\r\nVARNISH CRITICAL: Child process uptime (4,046)|MAIN.uptime=4046\r\n2\r\n```\r\n\r\nWorks like a charm!"}}
{"actor":{"display_login":"StoneISStephan"}}