{"action":"created","comment":{"url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/comments/35453497","id":35453497,"diff_hunk":"@@ -0,0 +1,144 @@\n+#! /usr/bin/env ruby\n+#\n+# check-ec2-filter\n+#\n+# DESCRIPTION:\n+#   This plugin retrieves EC2 instances matching a given filter and\n+#   returns the number matched\n+#\n+# OUTPUT:\n+#   plain-text\n+#\n+# PLATFORMS:\n+#   Linux\n+#\n+# DEPENDENCIES:\n+#   gem: aws-sdk\n+#   gem: sensu-plugin\n+#\n+# USAGE:\n+#   ./check-ec2-filter.rb -f \"{name:tag-value,values:[infrastructure]}\"\n+#   ./check-ec2-filter.rb -f \"{name:tag-value,values:[infrastructure]} {name:instance-state-name,values:[running]}\"","path":"bin/check-ec2-filter.rb","position":21,"original_position":21,"commit_id":"14b289be6ec075b5199b08a1e8d0fcee1e981bce","original_commit_id":"14b289be6ec075b5199b08a1e8d0fcee1e981bce","user":{"login":"tas50","id":1015200,"avatar_url":"https://avatars.githubusercontent.com/u/1015200?v=3","gravatar_id":"","url":"https://api.github.com/users/tas50","html_url":"https://github.com/tas50","followers_url":"https://api.github.com/users/tas50/followers","following_url":"https://api.github.com/users/tas50/following{/other_user}","gists_url":"https://api.github.com/users/tas50/gists{/gist_id}","starred_url":"https://api.github.com/users/tas50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tas50/subscriptions","organizations_url":"https://api.github.com/users/tas50/orgs","repos_url":"https://api.github.com/users/tas50/repos","events_url":"https://api.github.com/users/tas50/events{/privacy}","received_events_url":"https://api.github.com/users/tas50/received_events","type":"User","site_admin":false},"body":"Shouldn't the example contain the warn / critical flags?","created_at":"2015-07-24T18:44:03Z","updated_at":"2015-07-24T18:44:03Z","html_url":"https://github.com/sensu-plugins/sensu-plugins-aws/pull/30#discussion_r35453497","pull_request_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/comments/35453497"},"html":{"href":"https://github.com/sensu-plugins/sensu-plugins-aws/pull/30#discussion_r35453497"},"pull_request":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/30","id":40709736,"html_url":"https://github.com/sensu-plugins/sensu-plugins-aws/pull/30","diff_url":"https://github.com/sensu-plugins/sensu-plugins-aws/pull/30.diff","patch_url":"https://github.com/sensu-plugins/sensu-plugins-aws/pull/30.patch","issue_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/issues/30","number":30,"state":"open","locked":false,"title":"Moved filter parsing to library. Added check-ec2-filter","user":{"login":"jmccarty3","id":1431441,"avatar_url":"https://avatars.githubusercontent.com/u/1431441?v=3","gravatar_id":"","url":"https://api.github.com/users/jmccarty3","html_url":"https://github.com/jmccarty3","followers_url":"https://api.github.com/users/jmccarty3/followers","following_url":"https://api.github.com/users/jmccarty3/following{/other_user}","gists_url":"https://api.github.com/users/jmccarty3/gists{/gist_id}","starred_url":"https://api.github.com/users/jmccarty3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmccarty3/subscriptions","organizations_url":"https://api.github.com/users/jmccarty3/orgs","repos_url":"https://api.github.com/users/jmccarty3/repos","events_url":"https://api.github.com/users/jmccarty3/events{/privacy}","received_events_url":"https://api.github.com/users/jmccarty3/received_events","type":"User","site_admin":false},"body":"Move filter parsing logic into a separate library for reference.\r\n\r\nAdded a sensu check to provide warnings and critical alerts for a given filter.\r\nComparisons can be done via \"equal, not, less, greater\".","created_at":"2015-07-23T19:39:07Z","updated_at":"2015-07-24T18:44:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da4a57abe834333e0928f66a0dd1a35f0bc33171","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/30/commits","review_comments_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/30/comments","review_comment_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/issues/30/comments","statuses_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/statuses/14b289be6ec075b5199b08a1e8d0fcee1e981bce","head":{"label":"jmccarty3:upstream","ref":"upstream","sha":"14b289be6ec075b5199b08a1e8d0fcee1e981bce","user":{"login":"jmccarty3","id":1431441,"avatar_url":"https://avatars.githubusercontent.com/u/1431441?v=3","gravatar_id":"","url":"https://api.github.com/users/jmccarty3","html_url":"https://github.com/jmccarty3","followers_url":"https://api.github.com/users/jmccarty3/followers","following_url":"https://api.github.com/users/jmccarty3/following{/other_user}","gists_url":"https://api.github.com/users/jmccarty3/gists{/gist_id}","starred_url":"https://api.github.com/users/jmccarty3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmccarty3/subscriptions","organizations_url":"https://api.github.com/users/jmccarty3/orgs","repos_url":"https://api.github.com/users/jmccarty3/repos","events_url":"https://api.github.com/users/jmccarty3/events{/privacy}","received_events_url":"https://api.github.com/users/jmccarty3/received_events","type":"User","site_admin":false},"repo":{"id":39515116,"name":"sensu-plugins-aws","full_name":"jmccarty3/sensu-plugins-aws","owner":{"login":"jmccarty3","id":1431441,"avatar_url":"https://avatars.githubusercontent.com/u/1431441?v=3","gravatar_id":"","url":"https://api.github.com/users/jmccarty3","html_url":"https://github.com/jmccarty3","followers_url":"https://api.github.com/users/jmccarty3/followers","following_url":"https://api.github.com/users/jmccarty3/following{/other_user}","gists_url":"https://api.github.com/users/jmccarty3/gists{/gist_id}","starred_url":"https://api.github.com/users/jmccarty3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmccarty3/subscriptions","organizations_url":"https://api.github.com/users/jmccarty3/orgs","repos_url":"https://api.github.com/users/jmccarty3/repos","events_url":"https://api.github.com/users/jmccarty3/events{/privacy}","received_events_url":"https://api.github.com/users/jmccarty3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmccarty3/sensu-plugins-aws","description":"Sensu plugins AWS checks and handlers","fork":true,"url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws","forks_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/forks","keys_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/teams","hooks_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/hooks","issue_events_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/issues/events{/number}","events_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/events","assignees_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/assignees{/user}","branches_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/branches{/branch}","tags_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/tags","blobs_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/languages","stargazers_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/stargazers","contributors_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/contributors","subscribers_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/subscribers","subscription_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/subscription","commits_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/contents/{+path}","compare_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/merges","archive_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/downloads","issues_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/issues{/number}","pulls_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/labels{/name}","releases_url":"https://api.github.com/repos/jmccarty3/sensu-plugins-aws/releases{/id}","created_at":"2015-07-22T15:48:49Z","updated_at":"2015-07-22T15:48:49Z","pushed_at":"2015-07-24T15:30:10Z","git_url":"git://github.com/jmccarty3/sensu-plugins-aws.git","ssh_url":"git@github.com:jmccarty3/sensu-plugins-aws.git","clone_url":"https://github.com/jmccarty3/sensu-plugins-aws.git","svn_url":"https://github.com/jmccarty3/sensu-plugins-aws","homepage":"http://sensu-plugins.github.io","size":295,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sensu-plugins:master","ref":"master","sha":"2801f25379ec6d194d6da7c0905e416a38e27196","user":{"login":"sensu-plugins","id":10713628,"avatar_url":"https://avatars.githubusercontent.com/u/10713628?v=3","gravatar_id":"","url":"https://api.github.com/users/sensu-plugins","html_url":"https://github.com/sensu-plugins","followers_url":"https://api.github.com/users/sensu-plugins/followers","following_url":"https://api.github.com/users/sensu-plugins/following{/other_user}","gists_url":"https://api.github.com/users/sensu-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/sensu-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sensu-plugins/subscriptions","organizations_url":"https://api.github.com/users/sensu-plugins/orgs","repos_url":"https://api.github.com/users/sensu-plugins/repos","events_url":"https://api.github.com/users/sensu-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/sensu-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":30175941,"name":"sensu-plugins-aws","full_name":"sensu-plugins/sensu-plugins-aws","owner":{"login":"sensu-plugins","id":10713628,"avatar_url":"https://avatars.githubusercontent.com/u/10713628?v=3","gravatar_id":"","url":"https://api.github.com/users/sensu-plugins","html_url":"https://github.com/sensu-plugins","followers_url":"https://api.github.com/users/sensu-plugins/followers","following_url":"https://api.github.com/users/sensu-plugins/following{/other_user}","gists_url":"https://api.github.com/users/sensu-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/sensu-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sensu-plugins/subscriptions","organizations_url":"https://api.github.com/users/sensu-plugins/orgs","repos_url":"https://api.github.com/users/sensu-plugins/repos","events_url":"https://api.github.com/users/sensu-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/sensu-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sensu-plugins/sensu-plugins-aws","description":"Sensu plugins AWS checks and handlers","fork":false,"url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws","forks_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/forks","keys_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/teams","hooks_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/hooks","issue_events_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/issues/events{/number}","events_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/events","assignees_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/assignees{/user}","branches_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/branches{/branch}","tags_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/tags","blobs_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/statuses/{sha}","languages_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/languages","stargazers_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/stargazers","contributors_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/contributors","subscribers_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/subscribers","subscription_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/subscription","commits_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/contents/{+path}","compare_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/merges","archive_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/downloads","issues_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/issues{/number}","pulls_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls{/number}","milestones_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/milestones{/number}","notifications_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/labels{/name}","releases_url":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/releases{/id}","created_at":"2015-02-02T07:25:45Z","updated_at":"2015-07-14T18:49:55Z","pushed_at":"2015-07-24T15:30:10Z","git_url":"git://github.com/sensu-plugins/sensu-plugins-aws.git","ssh_url":"git@github.com:sensu-plugins/sensu-plugins-aws.git","clone_url":"https://github.com/sensu-plugins/sensu-plugins-aws.git","svn_url":"https://github.com/sensu-plugins/sensu-plugins-aws","homepage":"http://sensu-plugins.github.io","size":640,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":14,"forks":16,"open_issues":14,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/30"},"html":{"href":"https://github.com/sensu-plugins/sensu-plugins-aws/pull/30"},"issue":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/issues/30"},"comments":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/sensu-plugins/sensu-plugins-aws/statuses/14b289be6ec075b5199b08a1e8d0fcee1e981bce"}}}}