{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/dd-agent/pulls/comments/31356623","id":31356623,"diff_hunk":"@@ -0,0 +1,186 @@\n+\"\"\"Mesos Slave check\n+\n+Collects metrics from mesos slave node.\n+\"\"\"\n+# stdlib\n+from hashlib import md5\n+import time\n+\n+# 3rd party\n+import requests\n+\n+# project\n+from checks import AgentCheck, CheckException\n+\n+\n+class MesosSlave(AgentCheck):\n+    GAUGE = AgentCheck.gauge\n+    MONOTONIC_COUNT = AgentCheck.monotonic_count\n+    SERVICE_CHECK_NAME = \"mesos_slave.can_connect\"\n+    SERVICE_CHECK_NEEDED = True\n+\n+    TASK_STATUS = {\n+        'TASK_STARTING'     : AgentCheck.OK,\n+        'TASK_RUNNING'      : AgentCheck.OK,\n+        'TASK_FINISHED'     : AgentCheck.OK,\n+        'TASK_FAILED'       : AgentCheck.CRITICAL,\n+        'TASK_KILLED'       : AgentCheck.WARNING,\n+        'TASK_LOST'         : AgentCheck.CRITICAL,\n+        'TASK_STAGING'      : AgentCheck.OK,\n+        'TASK_ERROR'        : AgentCheck.CRITICAL,\n+    }\n+\n+    TASK_METRICS = {\n+        'cpus'                              : ('mesos.state.task.cpu', GAUGE),\n+        'mem'                               : ('mesos.state.task.mem', GAUGE),\n+        'disk'                              : ('mesos.state.task.disk', GAUGE),\n+    }\n+\n+    SLAVE_TASKS_METRICS = {\n+        'slave/tasks_failed'                : ('mesos.slave.tasks_failed', MONOTONIC_COUNT),\n+        'slave/tasks_finished'              : ('mesos.slave.tasks_finished', MONOTONIC_COUNT),\n+        'slave/tasks_killed'                : ('mesos.slave.tasks_killed', MONOTONIC_COUNT),\n+        'slave/tasks_lost'                  : ('mesos.slave.tasks_lost', MONOTONIC_COUNT),\n+        'slave/tasks_running'               : ('mesos.slave.tasks_running', GAUGE),\n+        'slave/tasks_staging'               : ('mesos.slave.tasks_staging', GAUGE),\n+        'slave/tasks_starting'              : ('mesos.slave.tasks_starting', GAUGE),\n+    }\n+\n+    SYSTEM_METRICS = {\n+        'system/cpus_total'                 : ('mesos.stats.system.cpus_total', GAUGE),\n+        'system/load_15min'                 : ('mesos.stats.system.load_15min', GAUGE),\n+        'system/load_1min'                  : ('mesos.stats.system.load_1min', GAUGE),\n+        'system/load_5min'                  : ('mesos.stats.system.load_5min', GAUGE),\n+        'system/mem_free_bytes'             : ('mesos.stats.system.mem_free_bytes', GAUGE),\n+        'system/mem_total_bytes'            : ('mesos.stats.system.mem_total_bytes', GAUGE),\n+        'slave/registered'                  : ('mesos.stats.registered', GAUGE),\n+        'slave/uptime_secs'                 : ('mesos.stats.uptime_secs', GAUGE),\n+    }\n+\n+    SLAVE_RESOURCE_METRICS = {\n+        'slave/cpus_percent'                : ('mesos.slave.cpus_percent', GAUGE),\n+        'slave/cpus_total'                  : ('mesos.slave.cpus_total', GAUGE),\n+        'slave/cpus_used'                   : ('mesos.slave.cpus_used', GAUGE),\n+        'slave/disk_percent'                : ('mesos.slave.disk_percent', GAUGE),\n+        'slave/disk_total'                  : ('mesos.slave.disk_total', GAUGE),\n+        'slave/disk_used'                   : ('mesos.slave.disk_used', GAUGE),\n+        'slave/mem_percent'                 : ('mesos.slave.mem_percent', GAUGE),\n+        'slave/mem_total'                   : ('mesos.slave.mem_total', GAUGE),\n+        'slave/mem_used'                    : ('mesos.slave.mem_used', GAUGE),\n+    }\n+\n+    SLAVE_EXECUTORS_METRICS = {\n+        'slave/executors_registering'       : ('mesos.slave.executors_registering', GAUGE),\n+        'slave/executors_running'           : ('mesos.slave.executors_running', GAUGE),\n+        'slave/executors_terminated'        : ('mesos.slave.executors_terminated', GAUGE),\n+        'slave/executors_terminating'       : ('mesos.slave.executors_terminating', GAUGE),\n+    }\n+\n+    STATS_METRICS = {\n+        'slave/frameworks_active'           : ('mesos.slave.frameworks_active', GAUGE),\n+        'slave/invalid_framework_messages'  : ('mesos.slave.invalid_framework_messages', GAUGE),\n+        'slave/invalid_status_updates'      : ('mesos.slave.invalid_status_updates', GAUGE),\n+        'slave/recovery_errors'             : ('mesos.slave.recovery_errors', GAUGE),\n+        'slave/valid_framework_messages'    : ('mesos.slave.valid_framework_messages', GAUGE),\n+        'slave/valid_status_updates'        : ('mesos.slave.valid_status_updates', GAUGE),\n+    }\n+\n+    def __init__(self, name, init_config, agentConfig, instances=None):\n+        AgentCheck.__init__(self, name, init_config, agentConfig, instances)\n+        self.cluster_name = None\n+\n+    def _get_json(self, url, timeout):\n+        # Use a hash of the URL as an aggregation key\n+        aggregation_key = md5(url).hexdigest()\n+        tags = [\"url:%s\" % url]\n+        msg = None\n+        status = None\n+        try:\n+            r = requests.get(url, timeout=timeout)\n+            if r.status_code != 200:\n+                status = AgentCheck.CRITICAL\n+                msg = \"Got %s when hitting %s\" % (r.status_code, url)\n+            else:\n+                status = AgentCheck.OK\n+                msg = \"Mesos master instance detected at %s \" % url\n+        except requests.exceptions.Timeout as e:\n+            # If there's a timeout\n+            msg = \"%s seconds timeout when hitting %s\" % (timeout, url)\n+            status = AgentCheck.CRITICAL\n+        except Exception as e:\n+            msg = str(e)\n+            status = AgentCheck.CRITICAL\n+        finally:\n+            if self.SERVICE_CHECK_NEEDED:\n+                self.service_check(self.SERVICE_CHECK_NAME, status, tags=tags, message=msg)\n+                self.SERVICE_CHECK_NEEDED = False\n+            if status is AgentCheck.CRITICAL:\n+                raise CheckException(\"Cannot connect to mesos, please check your configuration.\")\n+\n+        return r.json()\n+\n+    def _get_state(self, url, timeout):\n+        return self._get_json(url + '/state.json', timeout)\n+\n+    def _get_stats(self, url, timeout):\n+        if self.version >= [0, 22, 0]:\n+            endpoint = '/metrics/snapshot'\n+        else:\n+            endpoint = '/stats.json'\n+        return self._get_json(url + endpoint, timeout)\n+\n+    def _get_constant_attributes(self, url, timeout):\n+        state_metrics = None\n+        if self.cluster_name is None:\n+            state_metrics = self._get_state(url, timeout)\n+            if state_metrics is not None:\n+                self.version = map(int, state_metrics['version'].split('.'))\n+                master_state = self._get_state('http://' + state_metrics['master_hostname'] + ':5050', timeout)\n+                if master_state is not None:\n+                    self.cluster_name = master_state['cluster']\n+\n+        return state_metrics\n+\n+    def check(self, instance):\n+        if 'url' not in instance:\n+            raise Exception('Mesos instance missing \"url\" value.')\n+\n+        url = instance['url']\n+        instance_tags = instance.get('tags', [])\n+        tasks = instance.get('tasks', [])\n+        default_timeout = self.init_config.get('default_timeout', 5)\n+        timeout = float(instance.get('timeout', default_timeout))\n+\n+        state_metrics = self._get_constant_attributes(url, timeout)\n+        tags = None\n+\n+        if state_metrics is None:\n+            state_metrics = self._get_state(url, timeout)\n+        if state_metrics:\n+            tags = [\n+                'mesos_cluster:{0}'.format(self.cluster_name),\n+                'mesos_pid:{0}'.format(state_metrics['pid']),\n+                'mesos_node:slave'\n+            ]\n+            tags += instance_tags\n+\n+            for task in tasks:\n+                for framework in state_metrics['frameworks']:\n+                    for executor in framework['executors']:\n+                        for t in executor['tasks']:\n+                            if task.lower() in t['name'].lower() and t['slave_id'] == state_metrics['id']:\n+                                task_tags = ['task_name:' + t['name']] + tags\n+                                self.service_check(t['name'] + '.ok', self.TASK_STATUS[t['state']], tags=task_tags)\n+                                for key_name, (metric_name, metric_func) in self.TASK_METRICS.iteritems():\n+                                    metric_func(self, metric_name, t['resources'][key_name], tags=task_tags)\n+\n+        stats_metrics = self._get_stats(url, timeout)\n+        if stats_metrics:\n+            tags = tags if tags else instance_tags\n+            metrics = [self.SLAVE_TASKS_METRICS, self.SYSTEM_METRICS, self.SLAVE_RESOURCE_METRICS,\n+                      self.SLAVE_EXECUTORS_METRICS, self.STATS_METRICS]\n+            for m in metrics:\n+                for key_name, (metric_name, metric_func) in m.iteritems():\n+                    metric_func(self, metric_name, stats_metrics[key_name], tags=tags)\n+\n+        self.SERVICE_CHECK_NEEDED = True","path":"checks.d/mesos_slave.py","position":186,"original_position":186,"commit_id":"2476aa93fe80eaa90963afbf13ce8ba08324f56d","original_commit_id":"2476aa93fe80eaa90963afbf13ce8ba08324f56d","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":"nitpick, but usually upper case variables are for constants which is not the case here.","created_at":"2015-05-29T19:24:23Z","updated_at":"2015-05-29T19:24:23Z","html_url":"https://github.com/DataDog/dd-agent/pull/1535#discussion_r31356623","pull_request_url":"https://api.github.com/repos/DataDog/dd-agent/pulls/1535","_links":{"self":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/comments/31356623"},"html":{"href":"https://github.com/DataDog/dd-agent/pull/1535#discussion_r31356623"},"pull_request":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/1535"}}},"pull_request":{"url":"https://api.github.com/repos/DataDog/dd-agent/pulls/1535","id":33201033,"html_url":"https://github.com/DataDog/dd-agent/pull/1535","diff_url":"https://github.com/DataDog/dd-agent/pull/1535.diff","patch_url":"https://github.com/DataDog/dd-agent/pull/1535.patch","issue_url":"https://api.github.com/repos/DataDog/dd-agent/issues/1535","number":1535,"state":"open","locked":false,"title":"[mesos] Improve mesos integration","user":{"login":"DorianZaccaria","id":5608163,"avatar_url":"https://avatars.githubusercontent.com/u/5608163?v=3","gravatar_id":"","url":"https://api.github.com/users/DorianZaccaria","html_url":"https://github.com/DorianZaccaria","followers_url":"https://api.github.com/users/DorianZaccaria/followers","following_url":"https://api.github.com/users/DorianZaccaria/following{/other_user}","gists_url":"https://api.github.com/users/DorianZaccaria/gists{/gist_id}","starred_url":"https://api.github.com/users/DorianZaccaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DorianZaccaria/subscriptions","organizations_url":"https://api.github.com/users/DorianZaccaria/orgs","repos_url":"https://api.github.com/users/DorianZaccaria/repos","events_url":"https://api.github.com/users/DorianZaccaria/events{/privacy}","received_events_url":"https://api.github.com/users/DorianZaccaria/received_events","type":"User","site_admin":false},"body":"* Add a check for mesos masters, only the leader will report metrics\r\n* Add a check for mesos slave, slaves will report metrics from the selected\r\ntasks only if the task is running on the node\r\n* Add a mocked tests for mesos integration","created_at":"2015-04-13T20:39:10Z","updated_at":"2015-05-29T19:24:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a623e3d0399e5844eb888396fc58a085a11a740","assignee":{"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},"milestone":{"url":"https://api.github.com/repos/DataDog/dd-agent/milestones/43","html_url":"https://github.com/DataDog/dd-agent/milestones/5.4.0","labels_url":"https://api.github.com/repos/DataDog/dd-agent/milestones/43/labels","id":996033,"number":43,"title":"5.4.0","description":null,"creator":{"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},"open_issues":40,"closed_issues":48,"state":"open","created_at":"2015-02-25T23:32:42Z","updated_at":"2015-05-29T17:22:06Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/DataDog/dd-agent/pulls/1535/commits","review_comments_url":"https://api.github.com/repos/DataDog/dd-agent/pulls/1535/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/1535/comments","statuses_url":"https://api.github.com/repos/DataDog/dd-agent/statuses/2476aa93fe80eaa90963afbf13ce8ba08324f56d","head":{"label":"DataDog:dorian/mesos","ref":"dorian/mesos","sha":"2476aa93fe80eaa90963afbf13ce8ba08324f56d","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-05-25T09:20:56Z","pushed_at":"2015-05-29T17:22:06Z","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":55436,"stargazers_count":282,"watchers_count":282,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":213,"mirror_url":null,"open_issues_count":160,"forks":213,"open_issues":160,"watchers":282,"default_branch":"master"}},"base":{"label":"DataDog:master","ref":"master","sha":"8f69fd897460d08f530d5faf43542f161e19c712","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-05-25T09:20:56Z","pushed_at":"2015-05-29T17:22:06Z","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":55436,"stargazers_count":282,"watchers_count":282,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":213,"mirror_url":null,"open_issues_count":160,"forks":213,"open_issues":160,"watchers":282,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/1535"},"html":{"href":"https://github.com/DataDog/dd-agent/pull/1535"},"issue":{"href":"https://api.github.com/repos/DataDog/dd-agent/issues/1535"},"comments":{"href":"https://api.github.com/repos/DataDog/dd-agent/issues/1535/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/dd-agent/pulls/1535/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/1535/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/dd-agent/statuses/2476aa93fe80eaa90963afbf13ce8ba08324f56d"}}}}