{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/dd-agent/pulls/comments/28807699","id":28807699,"diff_hunk":"@@ -117,25 +122,49 @@ def _check_collector_blocked(self):\n             if self._collector_failed_heartbeats > self._max_failed_heartbeats:\n                 servicemanager.LogInfoMsg(\n                     \"%s was unresponsive for too long. Restarting...\" % 'collector')\n-                self._restart_proc('collector')\n+                self.procs['collector'].restart()\n                 self._collector_failed_heartbeats = 0\n \n-    def _restart_proc(self, proc_name):\n+\n+class ProcessWatchDog(object):\n+    \"\"\"\n+    Monitor the attached process.\n+    Restarts when it exits until the limit set is reached.\n+    \"\"\"\n+    def __init__(self, name, process, max_restarts=\"inf\"):","path":"win32/agent.py","position":62,"original_position":62,"commit_id":"97c4363c485a8ec427db193ae537e62daeafb334","original_commit_id":"97c4363c485a8ec427db193ae537e62daeafb334","user":{"login":"remh","id":1311477,"avatar_url":"https://avatars.githubusercontent.com/u/1311477?v=3","gravatar_id":"","url":"https://api.github.com/users/remh","html_url":"https://github.com/remh","followers_url":"https://api.github.com/users/remh/followers","following_url":"https://api.github.com/users/remh/following{/other_user}","gists_url":"https://api.github.com/users/remh/gists{/gist_id}","starred_url":"https://api.github.com/users/remh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remh/subscriptions","organizations_url":"https://api.github.com/users/remh/orgs","repos_url":"https://api.github.com/users/remh/repos","events_url":"https://api.github.com/users/remh/events{/privacy}","received_events_url":"https://api.github.com/users/remh/received_events","type":"User","site_admin":false},"body":"the default shouldn't be +inf it should be a reasonable value, 5 seems good to me.","created_at":"2015-04-21T18:28:15Z","updated_at":"2015-04-21T18:28:15Z","html_url":"https://github.com/DataDog/dd-agent/pull/1561#discussion_r28807699","pull_request_url":"https://api.github.com/repos/DataDog/dd-agent/pulls/1561","_links":{"self":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/comments/28807699"},"html":{"href":"https://github.com/DataDog/dd-agent/pull/1561#discussion_r28807699"},"pull_request":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/1561"}}},"pull_request":{"url":"https://api.github.com/repos/DataDog/dd-agent/pulls/1561","id":33686947,"html_url":"https://github.com/DataDog/dd-agent/pull/1561","diff_url":"https://github.com/DataDog/dd-agent/pull/1561.diff","patch_url":"https://github.com/DataDog/dd-agent/pull/1561.patch","issue_url":"https://api.github.com/repos/DataDog/dd-agent/issues/1561","number":1561,"state":"open","locked":false,"title":"[jmxfetch] fix windows bootloop :bug:","user":{"login":"yannmh","id":5708089,"avatar_url":"https://avatars.githubusercontent.com/u/5708089?v=3","gravatar_id":"","url":"https://api.github.com/users/yannmh","html_url":"https://github.com/yannmh","followers_url":"https://api.github.com/users/yannmh/followers","following_url":"https://api.github.com/users/yannmh/following{/other_user}","gists_url":"https://api.github.com/users/yannmh/gists{/gist_id}","starred_url":"https://api.github.com/users/yannmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannmh/subscriptions","organizations_url":"https://api.github.com/users/yannmh/orgs","repos_url":"https://api.github.com/users/yannmh/repos","events_url":"https://api.github.com/users/yannmh/events{/privacy}","received_events_url":"https://api.github.com/users/yannmh/received_events","type":"User","site_admin":false},"body":"* [Windows] Fix JMXFetch bootloop issue when no JMX integration config is found\r\n* [Linux][OSX] Better management of unexpected exit codes ( != 0)\r\n* [Linux][OSX] [Windows] Limit JMXFetch attempts of restarts to 3\r\n* [Linux][OSX][Windows] Fill a status when JMXFetch could not be launched","created_at":"2015-04-20T17:22:36Z","updated_at":"2015-04-21T18:28:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0897a7a830575685d8c74b9c355397b08cc4e33","assignee":{"login":"yannmh","id":5708089,"avatar_url":"https://avatars.githubusercontent.com/u/5708089?v=3","gravatar_id":"","url":"https://api.github.com/users/yannmh","html_url":"https://github.com/yannmh","followers_url":"https://api.github.com/users/yannmh/followers","following_url":"https://api.github.com/users/yannmh/following{/other_user}","gists_url":"https://api.github.com/users/yannmh/gists{/gist_id}","starred_url":"https://api.github.com/users/yannmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannmh/subscriptions","organizations_url":"https://api.github.com/users/yannmh/orgs","repos_url":"https://api.github.com/users/yannmh/repos","events_url":"https://api.github.com/users/yannmh/events{/privacy}","received_events_url":"https://api.github.com/users/yannmh/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DataDog/dd-agent/pulls/1561/commits","review_comments_url":"https://api.github.com/repos/DataDog/dd-agent/pulls/1561/comments","review_comment_url":"https://api.github.com/repos/DataDog/dd-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/dd-agent/issues/1561/comments","statuses_url":"https://api.github.com/repos/DataDog/dd-agent/statuses/97c4363c485a8ec427db193ae537e62daeafb334","head":{"label":"DataDog:yann/is-jmx-enabled-2","ref":"yann/is-jmx-enabled-2","sha":"97c4363c485a8ec427db193ae537e62daeafb334","user":{"login":"DataDog","id":365230,"avatar_url":"https://avatars.githubusercontent.com/u/365230?v=3","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":1210071,"name":"dd-agent","full_name":"DataDog/dd-agent","owner":{"login":"DataDog","id":365230,"avatar_url":"https://avatars.githubusercontent.com/u/365230?v=3","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataDog/dd-agent","description":"Datadog Agent","fork":false,"url":"https://api.github.com/repos/DataDog/dd-agent","forks_url":"https://api.github.com/repos/DataDog/dd-agent/forks","keys_url":"https://api.github.com/repos/DataDog/dd-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/dd-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/dd-agent/teams","hooks_url":"https://api.github.com/repos/DataDog/dd-agent/hooks","issue_events_url":"https://api.github.com/repos/DataDog/dd-agent/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/dd-agent/events","assignees_url":"https://api.github.com/repos/DataDog/dd-agent/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/dd-agent/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/dd-agent/tags","blobs_url":"https://api.github.com/repos/DataDog/dd-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/dd-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/dd-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/dd-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/dd-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/dd-agent/languages","stargazers_url":"https://api.github.com/repos/DataDog/dd-agent/stargazers","contributors_url":"https://api.github.com/repos/DataDog/dd-agent/contributors","subscribers_url":"https://api.github.com/repos/DataDog/dd-agent/subscribers","subscription_url":"https://api.github.com/repos/DataDog/dd-agent/subscription","commits_url":"https://api.github.com/repos/DataDog/dd-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/dd-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/dd-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/dd-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/dd-agent/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/dd-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/dd-agent/merges","archive_url":"https://api.github.com/repos/DataDog/dd-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/dd-agent/downloads","issues_url":"https://api.github.com/repos/DataDog/dd-agent/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/dd-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/dd-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/dd-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/dd-agent/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/dd-agent/releases{/id}","created_at":"2010-12-31T03:02:47Z","updated_at":"2015-04-20T23:59:47Z","pushed_at":"2015-04-21T17:51:37Z","git_url":"git://github.com/DataDog/dd-agent.git","ssh_url":"git@github.com:DataDog/dd-agent.git","clone_url":"https://github.com/DataDog/dd-agent.git","svn_url":"https://github.com/DataDog/dd-agent","homepage":"http://docs.datadoghq.com/","size":50233,"stargazers_count":273,"watchers_count":273,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":198,"mirror_url":null,"open_issues_count":164,"forks":198,"open_issues":164,"watchers":273,"default_branch":"master"}},"base":{"label":"DataDog:master","ref":"master","sha":"09990575b44d313180abc554d9be9bf78ffcad8f","user":{"login":"DataDog","id":365230,"avatar_url":"https://avatars.githubusercontent.com/u/365230?v=3","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":1210071,"name":"dd-agent","full_name":"DataDog/dd-agent","owner":{"login":"DataDog","id":365230,"avatar_url":"https://avatars.githubusercontent.com/u/365230?v=3","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataDog/dd-agent","description":"Datadog Agent","fork":false,"url":"https://api.github.com/repos/DataDog/dd-agent","forks_url":"https://api.github.com/repos/DataDog/dd-agent/forks","keys_url":"https://api.github.com/repos/DataDog/dd-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/dd-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/dd-agent/teams","hooks_url":"https://api.github.com/repos/DataDog/dd-agent/hooks","issue_events_url":"https://api.github.com/repos/DataDog/dd-agent/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/dd-agent/events","assignees_url":"https://api.github.com/repos/DataDog/dd-agent/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/dd-agent/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/dd-agent/tags","blobs_url":"https://api.github.com/repos/DataDog/dd-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/dd-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/dd-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/dd-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/dd-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/dd-agent/languages","stargazers_url":"https://api.github.com/repos/DataDog/dd-agent/stargazers","contributors_url":"https://api.github.com/repos/DataDog/dd-agent/contributors","subscribers_url":"https://api.github.com/repos/DataDog/dd-agent/subscribers","subscription_url":"https://api.github.com/repos/DataDog/dd-agent/subscription","commits_url":"https://api.github.com/repos/DataDog/dd-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/dd-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/dd-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/dd-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/dd-agent/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/dd-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/dd-agent/merges","archive_url":"https://api.github.com/repos/DataDog/dd-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/dd-agent/downloads","issues_url":"https://api.github.com/repos/DataDog/dd-agent/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/dd-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/dd-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/dd-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/dd-agent/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/dd-agent/releases{/id}","created_at":"2010-12-31T03:02:47Z","updated_at":"2015-04-20T23:59:47Z","pushed_at":"2015-04-21T17:51:37Z","git_url":"git://github.com/DataDog/dd-agent.git","ssh_url":"git@github.com:DataDog/dd-agent.git","clone_url":"https://github.com/DataDog/dd-agent.git","svn_url":"https://github.com/DataDog/dd-agent","homepage":"http://docs.datadoghq.com/","size":50233,"stargazers_count":273,"watchers_count":273,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":198,"mirror_url":null,"open_issues_count":164,"forks":198,"open_issues":164,"watchers":273,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/1561"},"html":{"href":"https://github.com/DataDog/dd-agent/pull/1561"},"issue":{"href":"https://api.github.com/repos/DataDog/dd-agent/issues/1561"},"comments":{"href":"https://api.github.com/repos/DataDog/dd-agent/issues/1561/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/1561/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/1561/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/dd-agent/statuses/97c4363c485a8ec427db193ae537e62daeafb334"}}}}