{"action":"created","comment":{"url":"https://api.github.com/repos/firehol/netdata/pulls/comments/171461664","pull_request_review_id":100315562,"id":171461664,"diff_hunk":"@@ -75,20 +75,30 @@ def _get_raw_data(self, url=None, manager=None):\n         :return: str\n         \"\"\"\n         try:\n-            url = url or self.url\n-            manager = manager or self._manager\n-            response = manager.request(method='GET',\n-                                       url=url,\n-                                       timeout=self.request_timeout,\n-                                       retries=1,\n-                                       headers=manager.headers)\n+            status, data = self._get_raw_data_with_status(url, manager)\n+            if status == 200:","path":"python.d/python_modules/bases/FrameworkServices/UrlService.py","position":12,"original_position":12,"commit_id":"e5fdeec843b98d05fbf085fa4ad16eca04909c59","original_commit_id":"e5fdeec843b98d05fbf085fa4ad16eca04909c59","user":{"login":"l2isbad","id":22274335,"avatar_url":"https://avatars3.githubusercontent.com/u/22274335?v=4","gravatar_id":"","url":"https://api.github.com/users/l2isbad","html_url":"https://github.com/l2isbad","followers_url":"https://api.github.com/users/l2isbad/followers","following_url":"https://api.github.com/users/l2isbad/following{/other_user}","gists_url":"https://api.github.com/users/l2isbad/gists{/gist_id}","starred_url":"https://api.github.com/users/l2isbad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l2isbad/subscriptions","organizations_url":"https://api.github.com/users/l2isbad/orgs","repos_url":"https://api.github.com/users/l2isbad/repos","events_url":"https://api.github.com/users/l2isbad/events{/privacy}","received_events_url":"https://api.github.com/users/l2isbad/received_events","type":"User","site_admin":false},"body":"please move the code after  \r\n```python\r\nstatus, data = self._get_raw_data_with_status(url, manager)\r\n```\r\nto the else block of `try/except` or just after `except`","created_at":"2018-03-01T04:40:21Z","updated_at":"2018-03-01T04:40:24Z","html_url":"https://github.com/firehol/netdata/pull/3448#discussion_r171461664","pull_request_url":"https://api.github.com/repos/firehol/netdata/pulls/3448","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/firehol/netdata/pulls/comments/171461664"},"html":{"href":"https://github.com/firehol/netdata/pull/3448#discussion_r171461664"},"pull_request":{"href":"https://api.github.com/repos/firehol/netdata/pulls/3448"}}},"pull_request":{"url":"https://api.github.com/repos/firehol/netdata/pulls/3448","id":170300646,"html_url":"https://github.com/firehol/netdata/pull/3448","diff_url":"https://github.com/firehol/netdata/pull/3448.diff","patch_url":"https://github.com/firehol/netdata/pull/3448.patch","issue_url":"https://api.github.com/repos/firehol/netdata/issues/3448","number":3448,"state":"open","locked":false,"title":"Add Http check plugin","user":{"login":"ccremer","id":12159026,"avatar_url":"https://avatars3.githubusercontent.com/u/12159026?v=4","gravatar_id":"","url":"https://api.github.com/users/ccremer","html_url":"https://github.com/ccremer","followers_url":"https://api.github.com/users/ccremer/followers","following_url":"https://api.github.com/users/ccremer/following{/other_user}","gists_url":"https://api.github.com/users/ccremer/gists{/gist_id}","starred_url":"https://api.github.com/users/ccremer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccremer/subscriptions","organizations_url":"https://api.github.com/users/ccremer/orgs","repos_url":"https://api.github.com/users/ccremer/repos","events_url":"https://api.github.com/users/ccremer/events{/privacy}","received_events_url":"https://api.github.com/users/ccremer/received_events","type":"User","site_admin":false},"body":"More specialized version of the port check plugin. This plugin measures the response of web servers and checks if the content is expected.\r\n* Is it efficient?\r\n  You judge ;)\r\n* Why?\r\n  1. For simple use cases where nagios etc. would introduce another unnecessary tool and maintenance\r\n  2. API access for custom dashboards\r\n  3. When using a minimal netdata installation in docker-compose file as slave for health checking a docker image (I'm working on it).\r\n\r\nI would like to add alarm templates, but I don't know how (expression) and what a sensible default would be. Any quick ideas? E.g. warning when error code > 0 for last 20 sec, critical over last 1 min and error code >2. To catch service flapping maybe take averages (e.g. average err code of >2.2) ?\r\n\r\n![httpcheck](https://user-images.githubusercontent.com/12159026/36447709-77c2f400-1685-11e8-941a-07ac7c7f10d8.png)","created_at":"2018-02-20T20:32:16Z","updated_at":"2018-03-01T04:40:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82def91eb676670d4b275979e2ca463c5ad72aae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/firehol/netdata/pulls/3448/commits","review_comments_url":"https://api.github.com/repos/firehol/netdata/pulls/3448/comments","review_comment_url":"https://api.github.com/repos/firehol/netdata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/firehol/netdata/issues/3448/comments","statuses_url":"https://api.github.com/repos/firehol/netdata/statuses/e5fdeec843b98d05fbf085fa4ad16eca04909c59","head":{"label":"ccremer:httpcheck","ref":"httpcheck","sha":"e5fdeec843b98d05fbf085fa4ad16eca04909c59","user":{"login":"ccremer","id":12159026,"avatar_url":"https://avatars3.githubusercontent.com/u/12159026?v=4","gravatar_id":"","url":"https://api.github.com/users/ccremer","html_url":"https://github.com/ccremer","followers_url":"https://api.github.com/users/ccremer/followers","following_url":"https://api.github.com/users/ccremer/following{/other_user}","gists_url":"https://api.github.com/users/ccremer/gists{/gist_id}","starred_url":"https://api.github.com/users/ccremer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccremer/subscriptions","organizations_url":"https://api.github.com/users/ccremer/orgs","repos_url":"https://api.github.com/users/ccremer/repos","events_url":"https://api.github.com/users/ccremer/events{/privacy}","received_events_url":"https://api.github.com/users/ccremer/received_events","type":"User","site_admin":false},"repo":{"id":95368204,"name":"netdata","full_name":"ccremer/netdata","owner":{"login":"ccremer","id":12159026,"avatar_url":"https://avatars3.githubusercontent.com/u/12159026?v=4","gravatar_id":"","url":"https://api.github.com/users/ccremer","html_url":"https://github.com/ccremer","followers_url":"https://api.github.com/users/ccremer/followers","following_url":"https://api.github.com/users/ccremer/following{/other_user}","gists_url":"https://api.github.com/users/ccremer/gists{/gist_id}","starred_url":"https://api.github.com/users/ccremer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccremer/subscriptions","organizations_url":"https://api.github.com/users/ccremer/orgs","repos_url":"https://api.github.com/users/ccremer/repos","events_url":"https://api.github.com/users/ccremer/events{/privacy}","received_events_url":"https://api.github.com/users/ccremer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ccremer/netdata","description":"Get control of your servers. Simple. Effective. Awesome! https://my-netdata.io/","fork":true,"url":"https://api.github.com/repos/ccremer/netdata","forks_url":"https://api.github.com/repos/ccremer/netdata/forks","keys_url":"https://api.github.com/repos/ccremer/netdata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ccremer/netdata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ccremer/netdata/teams","hooks_url":"https://api.github.com/repos/ccremer/netdata/hooks","issue_events_url":"https://api.github.com/repos/ccremer/netdata/issues/events{/number}","events_url":"https://api.github.com/repos/ccremer/netdata/events","assignees_url":"https://api.github.com/repos/ccremer/netdata/assignees{/user}","branches_url":"https://api.github.com/repos/ccremer/netdata/branches{/branch}","tags_url":"https://api.github.com/repos/ccremer/netdata/tags","blobs_url":"https://api.github.com/repos/ccremer/netdata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ccremer/netdata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ccremer/netdata/git/refs{/sha}","trees_url":"https://api.github.com/repos/ccremer/netdata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ccremer/netdata/statuses/{sha}","languages_url":"https://api.github.com/repos/ccremer/netdata/languages","stargazers_url":"https://api.github.com/repos/ccremer/netdata/stargazers","contributors_url":"https://api.github.com/repos/ccremer/netdata/contributors","subscribers_url":"https://api.github.com/repos/ccremer/netdata/subscribers","subscription_url":"https://api.github.com/repos/ccremer/netdata/subscription","commits_url":"https://api.github.com/repos/ccremer/netdata/commits{/sha}","git_commits_url":"https://api.github.com/repos/ccremer/netdata/git/commits{/sha}","comments_url":"https://api.github.com/repos/ccremer/netdata/comments{/number}","issue_comment_url":"https://api.github.com/repos/ccremer/netdata/issues/comments{/number}","contents_url":"https://api.github.com/repos/ccremer/netdata/contents/{+path}","compare_url":"https://api.github.com/repos/ccremer/netdata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ccremer/netdata/merges","archive_url":"https://api.github.com/repos/ccremer/netdata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ccremer/netdata/downloads","issues_url":"https://api.github.com/repos/ccremer/netdata/issues{/number}","pulls_url":"https://api.github.com/repos/ccremer/netdata/pulls{/number}","milestones_url":"https://api.github.com/repos/ccremer/netdata/milestones{/number}","notifications_url":"https://api.github.com/repos/ccremer/netdata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ccremer/netdata/labels{/name}","releases_url":"https://api.github.com/repos/ccremer/netdata/releases{/id}","deployments_url":"https://api.github.com/repos/ccremer/netdata/deployments","created_at":"2017-06-25T15:25:23Z","updated_at":"2017-06-25T15:25:27Z","pushed_at":"2018-02-28T17:30:13Z","git_url":"git://github.com/ccremer/netdata.git","ssh_url":"git@github.com:ccremer/netdata.git","clone_url":"https://github.com/ccremer/netdata.git","svn_url":"https://github.com/ccremer/netdata","homepage":"","size":22915,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"firehol:master","ref":"master","sha":"1063556e70bcd822b127362520081a81a5c504f1","user":{"login":"firehol","id":9442231,"avatar_url":"https://avatars2.githubusercontent.com/u/9442231?v=4","gravatar_id":"","url":"https://api.github.com/users/firehol","html_url":"https://github.com/firehol","followers_url":"https://api.github.com/users/firehol/followers","following_url":"https://api.github.com/users/firehol/following{/other_user}","gists_url":"https://api.github.com/users/firehol/gists{/gist_id}","starred_url":"https://api.github.com/users/firehol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firehol/subscriptions","organizations_url":"https://api.github.com/users/firehol/orgs","repos_url":"https://api.github.com/users/firehol/repos","events_url":"https://api.github.com/users/firehol/events{/privacy}","received_events_url":"https://api.github.com/users/firehol/received_events","type":"Organization","site_admin":false},"repo":{"id":10744183,"name":"netdata","full_name":"firehol/netdata","owner":{"login":"firehol","id":9442231,"avatar_url":"https://avatars2.githubusercontent.com/u/9442231?v=4","gravatar_id":"","url":"https://api.github.com/users/firehol","html_url":"https://github.com/firehol","followers_url":"https://api.github.com/users/firehol/followers","following_url":"https://api.github.com/users/firehol/following{/other_user}","gists_url":"https://api.github.com/users/firehol/gists{/gist_id}","starred_url":"https://api.github.com/users/firehol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firehol/subscriptions","organizations_url":"https://api.github.com/users/firehol/orgs","repos_url":"https://api.github.com/users/firehol/repos","events_url":"https://api.github.com/users/firehol/events{/privacy}","received_events_url":"https://api.github.com/users/firehol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/firehol/netdata","description":"Get control of your servers. Simple. Effective. Awesome! https://my-netdata.io/","fork":false,"url":"https://api.github.com/repos/firehol/netdata","forks_url":"https://api.github.com/repos/firehol/netdata/forks","keys_url":"https://api.github.com/repos/firehol/netdata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firehol/netdata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firehol/netdata/teams","hooks_url":"https://api.github.com/repos/firehol/netdata/hooks","issue_events_url":"https://api.github.com/repos/firehol/netdata/issues/events{/number}","events_url":"https://api.github.com/repos/firehol/netdata/events","assignees_url":"https://api.github.com/repos/firehol/netdata/assignees{/user}","branches_url":"https://api.github.com/repos/firehol/netdata/branches{/branch}","tags_url":"https://api.github.com/repos/firehol/netdata/tags","blobs_url":"https://api.github.com/repos/firehol/netdata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firehol/netdata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firehol/netdata/git/refs{/sha}","trees_url":"https://api.github.com/repos/firehol/netdata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firehol/netdata/statuses/{sha}","languages_url":"https://api.github.com/repos/firehol/netdata/languages","stargazers_url":"https://api.github.com/repos/firehol/netdata/stargazers","contributors_url":"https://api.github.com/repos/firehol/netdata/contributors","subscribers_url":"https://api.github.com/repos/firehol/netdata/subscribers","subscription_url":"https://api.github.com/repos/firehol/netdata/subscription","commits_url":"https://api.github.com/repos/firehol/netdata/commits{/sha}","git_commits_url":"https://api.github.com/repos/firehol/netdata/git/commits{/sha}","comments_url":"https://api.github.com/repos/firehol/netdata/comments{/number}","issue_comment_url":"https://api.github.com/repos/firehol/netdata/issues/comments{/number}","contents_url":"https://api.github.com/repos/firehol/netdata/contents/{+path}","compare_url":"https://api.github.com/repos/firehol/netdata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firehol/netdata/merges","archive_url":"https://api.github.com/repos/firehol/netdata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firehol/netdata/downloads","issues_url":"https://api.github.com/repos/firehol/netdata/issues{/number}","pulls_url":"https://api.github.com/repos/firehol/netdata/pulls{/number}","milestones_url":"https://api.github.com/repos/firehol/netdata/milestones{/number}","notifications_url":"https://api.github.com/repos/firehol/netdata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firehol/netdata/labels{/name}","releases_url":"https://api.github.com/repos/firehol/netdata/releases{/id}","deployments_url":"https://api.github.com/repos/firehol/netdata/deployments","created_at":"2013-06-17T18:39:10Z","updated_at":"2018-03-01T03:34:41Z","pushed_at":"2018-03-01T03:29:00Z","git_url":"git://github.com/firehol/netdata.git","ssh_url":"git@github.com:firehol/netdata.git","clone_url":"https://github.com/firehol/netdata.git","svn_url":"https://github.com/firehol/netdata","homepage":"","size":22907,"stargazers_count":27787,"watchers_count":27787,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2318,"mirror_url":null,"archived":false,"open_issues_count":356,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2318,"open_issues":356,"watchers":27787,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firehol/netdata/pulls/3448"},"html":{"href":"https://github.com/firehol/netdata/pull/3448"},"issue":{"href":"https://api.github.com/repos/firehol/netdata/issues/3448"},"comments":{"href":"https://api.github.com/repos/firehol/netdata/issues/3448/comments"},"review_comments":{"href":"https://api.github.com/repos/firehol/netdata/pulls/3448/comments"},"review_comment":{"href":"https://api.github.com/repos/firehol/netdata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/firehol/netdata/pulls/3448/commits"},"statuses":{"href":"https://api.github.com/repos/firehol/netdata/statuses/e5fdeec843b98d05fbf085fa4ad16eca04909c59"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"l2isbad"}}