{"action":"created","issue":{"url":"https://api.github.com/repos/phrawzty/check_http_json/issues/33","repository_url":"https://api.github.com/repos/phrawzty/check_http_json","labels_url":"https://api.github.com/repos/phrawzty/check_http_json/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/phrawzty/check_http_json/issues/33/comments","events_url":"https://api.github.com/repos/phrawzty/check_http_json/issues/33/events","html_url":"https://github.com/phrawzty/check_http_json/pull/33","id":209289951,"number":33,"title":"Add ability to check multiple values on optional flag","user":{"login":"Project0","id":2286479,"avatar_url":"https://avatars.githubusercontent.com/u/2286479?v=3","gravatar_id":"","url":"https://api.github.com/users/Project0","html_url":"https://github.com/Project0","followers_url":"https://api.github.com/users/Project0/followers","following_url":"https://api.github.com/users/Project0/following{/other_user}","gists_url":"https://api.github.com/users/Project0/gists{/gist_id}","starred_url":"https://api.github.com/users/Project0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Project0/subscriptions","organizations_url":"https://api.github.com/users/Project0/orgs","repos_url":"https://api.github.com/users/Project0/repos","events_url":"https://api.github.com/users/Project0/events{/privacy}","received_events_url":"https://api.github.com/users/Project0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-21T22:16:09Z","updated_at":"2017-02-22T16:31:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/phrawzty/check_http_json/pulls/33","html_url":"https://github.com/phrawzty/check_http_json/pull/33","diff_url":"https://github.com/phrawzty/check_http_json/pull/33.diff","patch_url":"https://github.com/phrawzty/check_http_json/pull/33.patch"},"body":"Did some refactor to check multiple elements, which can be enabled by --element_regex_global.\r\nReplaced the define do_exit by a Nagios module to handle the exit message and code. \r\nAdd rubocop definition.\r\n\r\nImplements #32  "},"comment":{"url":"https://api.github.com/repos/phrawzty/check_http_json/issues/comments/281722374","html_url":"https://github.com/phrawzty/check_http_json/pull/33#issuecomment-281722374","issue_url":"https://api.github.com/repos/phrawzty/check_http_json/issues/33","id":281722374,"user":{"login":"phrawzty","id":625232,"avatar_url":"https://avatars.githubusercontent.com/u/625232?v=3","gravatar_id":"","url":"https://api.github.com/users/phrawzty","html_url":"https://github.com/phrawzty","followers_url":"https://api.github.com/users/phrawzty/followers","following_url":"https://api.github.com/users/phrawzty/following{/other_user}","gists_url":"https://api.github.com/users/phrawzty/gists{/gist_id}","starred_url":"https://api.github.com/users/phrawzty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phrawzty/subscriptions","organizations_url":"https://api.github.com/users/phrawzty/orgs","repos_url":"https://api.github.com/users/phrawzty/repos","events_url":"https://api.github.com/users/phrawzty/events{/privacy}","received_events_url":"https://api.github.com/users/phrawzty/received_events","type":"User","site_admin":false},"created_at":"2017-02-22T16:31:17Z","updated_at":"2017-02-22T16:31:17Z","body":"I ran some manual tests (TODO: automated tests :stuck_out_tongue_closed_eyes:) in the following versions:\r\n* 1.8.7-p374\r\n* 1.9.3-p551\r\n* 2.4.0\r\n\r\nAfter re-adding `require rubygems` for 1.8.7, I can confirm that this PR does indeed satisfy #32, so that's great!\r\n\r\nBeyond the line-specific commentary above, I'd like to address the output a little bit.  I don't know if I have any answers, but it's worth addressing since the new functionality may need to have amplified output and/or additional explanation in the docs.\r\n\r\nConsider:\r\n\r\n```\r\n(pr/33) $ ./check_http_json.rb -u http://jsonplaceholder.typicode.com/users -E id -w 11 -c 15 --element_regex_global\r\nOK: \r\n```\r\n\r\nIn the above example, the script (correctly) exits 0, but the OK message is empty.  In every other instance (including other OK conditions) it contains _something_, which means this _feels_ incorrect and could lead to a bad user experience.\r\n\r\nConsider:\r\n\r\n```\r\n(pr/33) $ ./check_http_json.rb -u http://jsonplaceholder.typicode.com/users -E id -W 11 -C 15 --element_regex_global\r\nOK: 9.id does not match 11 or 15\r\n```\r\n\r\nOk, but what about `[0-8].id` - did they match?  Although *we* can interpret the meaning from knowledge of the code, it's not necessarily intuitive.\r\n\r\nConsider:\r\n\r\n```\r\n./check_http_json.rb -u http://jsonplaceholder.typicode.com/users -E id -w 5 -c 15 --element_regex_global\r\nWARN: 9.id is above threshold value 5 (10)\r\n```\r\n\r\nThis is true; however `[5-8].id` are *also* above the threshold value, which may be important to know as well.\r\n\r\nThe user experience here is important.  I'm open to any thoughts you have on how to make this easier / smoother for the poor sysadmins that have to interpret these results at 02:00."}}
{"actor":{"display_login":"phrawzty"}}