{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/36853872","id":36853872,"diff_hunk":"@@ -0,0 +1,33 @@\n+# A scrape configuration containing exactly one endpoint to scrape:\n+# Here it's Prometheus itself.\n+global:\n+  scrape_interval:     15s # By default, scrape targets every 15 seconds.\n+  evaluation_interval: 15s # By default, scrape targets every 15 seconds.\n+  scrape_timeout: 10s\n+\n+scrape_configs:\n+# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.\n+- job_name: 'prometheus'\n+\n+  target_groups:\n+  - targets: ['localhost:9090']\n+\n+- job_name: 'kubernetes'\n+\n+  kubernetes_sd_configs:\n+  - server: 'https://kubernetes.default.svc'\n+    in_cluster: true\n+\n+  metric_relabel_configs:","path":"documentation/examples/prometheus-kubernetes.yml","position":21,"original_position":21,"commit_id":"f78a66a5dc798458c1f7ce654c2aad0541a301ff","original_commit_id":"719c6f12ac5d880c6bc192871c6c216f18bd0b45","user":{"login":"brian-brazil","id":7115638,"avatar_url":"https://avatars.githubusercontent.com/u/7115638?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-brazil","html_url":"https://github.com/brian-brazil","followers_url":"https://api.github.com/users/brian-brazil/followers","following_url":"https://api.github.com/users/brian-brazil/following{/other_user}","gists_url":"https://api.github.com/users/brian-brazil/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-brazil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-brazil/subscriptions","organizations_url":"https://api.github.com/users/brian-brazil/orgs","repos_url":"https://api.github.com/users/brian-brazil/repos","events_url":"https://api.github.com/users/brian-brazil/events{/privacy}","received_events_url":"https://api.github.com/users/brian-brazil/received_events","type":"User","site_admin":false},"body":"This is going to affect all scraped kubernetes metrics, so you'll need to be much more specific on the source labels to only affect the right target. In fact given that this is a regex applied to every ingested sample, you may want a separate scrape config for it.\r\n\r\nI don't suppose this is something the kublet could do itself?","created_at":"2015-08-12T12:34:46Z","updated_at":"2015-08-12T12:34:46Z","html_url":"https://github.com/prometheus/prometheus/pull/905#discussion_r36853872","pull_request_url":"https://api.github.com/repos/prometheus/prometheus/pulls/905","_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/36853872"},"html":{"href":"https://github.com/prometheus/prometheus/pull/905#discussion_r36853872"},"pull_request":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/905"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/905","id":40298852,"html_url":"https://github.com/prometheus/prometheus/pull/905","diff_url":"https://github.com/prometheus/prometheus/pull/905.diff","patch_url":"https://github.com/prometheus/prometheus/pull/905.patch","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/905","number":905,"state":"open","locked":false,"title":"Kubernetes discovery","user":{"login":"jimmidyson","id":464659,"avatar_url":"https://avatars.githubusercontent.com/u/464659?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmidyson","html_url":"https://github.com/jimmidyson","followers_url":"https://api.github.com/users/jimmidyson/followers","following_url":"https://api.github.com/users/jimmidyson/following{/other_user}","gists_url":"https://api.github.com/users/jimmidyson/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmidyson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmidyson/subscriptions","organizations_url":"https://api.github.com/users/jimmidyson/orgs","repos_url":"https://api.github.com/users/jimmidyson/repos","events_url":"https://api.github.com/users/jimmidyson/events{/privacy}","received_events_url":"https://api.github.com/users/jimmidyson/received_events","type":"User","site_admin":false},"body":"As discussed in #904. This initial implementation adds in node discovery which scrapes pod/container metrics from all nodes in the cluster.\r\n\r\nWould love feedback please. Missing tests, although I guess only place that I can add them easily is to the config parsing? Oh & documentation.\r\n\r\nSorry about the amount of godeps required - not sure of how to avoid that if that's a problem? Certainly makes the PR harder to review. If you have a better way to add these deps in please let me know.","created_at":"2015-07-18T21:30:50Z","updated_at":"2015-08-12T12:34:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e79c264a8b3de820440176af00c8ca3c13de9839","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/prometheus/pulls/905/commits","review_comments_url":"https://api.github.com/repos/prometheus/prometheus/pulls/905/comments","review_comment_url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/905/comments","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/f78a66a5dc798458c1f7ce654c2aad0541a301ff","head":{"label":"fabric8io:kubernetes-discovery","ref":"kubernetes-discovery","sha":"f78a66a5dc798458c1f7ce654c2aad0541a301ff","user":{"login":"fabric8io","id":6074349,"avatar_url":"https://avatars.githubusercontent.com/u/6074349?v=3","gravatar_id":"","url":"https://api.github.com/users/fabric8io","html_url":"https://github.com/fabric8io","followers_url":"https://api.github.com/users/fabric8io/followers","following_url":"https://api.github.com/users/fabric8io/following{/other_user}","gists_url":"https://api.github.com/users/fabric8io/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8io/subscriptions","organizations_url":"https://api.github.com/users/fabric8io/orgs","repos_url":"https://api.github.com/users/fabric8io/repos","events_url":"https://api.github.com/users/fabric8io/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8io/received_events","type":"Organization","site_admin":false},"repo":{"id":39276484,"name":"prometheus","full_name":"fabric8io/prometheus","owner":{"login":"fabric8io","id":6074349,"avatar_url":"https://avatars.githubusercontent.com/u/6074349?v=3","gravatar_id":"","url":"https://api.github.com/users/fabric8io","html_url":"https://github.com/fabric8io","followers_url":"https://api.github.com/users/fabric8io/followers","following_url":"https://api.github.com/users/fabric8io/following{/other_user}","gists_url":"https://api.github.com/users/fabric8io/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8io/subscriptions","organizations_url":"https://api.github.com/users/fabric8io/orgs","repos_url":"https://api.github.com/users/fabric8io/repos","events_url":"https://api.github.com/users/fabric8io/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fabric8io/prometheus","description":"The Prometheus monitoring system and time series database.","fork":true,"url":"https://api.github.com/repos/fabric8io/prometheus","forks_url":"https://api.github.com/repos/fabric8io/prometheus/forks","keys_url":"https://api.github.com/repos/fabric8io/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8io/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8io/prometheus/teams","hooks_url":"https://api.github.com/repos/fabric8io/prometheus/hooks","issue_events_url":"https://api.github.com/repos/fabric8io/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8io/prometheus/events","assignees_url":"https://api.github.com/repos/fabric8io/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8io/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8io/prometheus/tags","blobs_url":"https://api.github.com/repos/fabric8io/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8io/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8io/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8io/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8io/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8io/prometheus/languages","stargazers_url":"https://api.github.com/repos/fabric8io/prometheus/stargazers","contributors_url":"https://api.github.com/repos/fabric8io/prometheus/contributors","subscribers_url":"https://api.github.com/repos/fabric8io/prometheus/subscribers","subscription_url":"https://api.github.com/repos/fabric8io/prometheus/subscription","commits_url":"https://api.github.com/repos/fabric8io/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8io/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8io/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8io/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8io/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8io/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8io/prometheus/merges","archive_url":"https://api.github.com/repos/fabric8io/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8io/prometheus/downloads","issues_url":"https://api.github.com/repos/fabric8io/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8io/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8io/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8io/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8io/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/fabric8io/prometheus/releases{/id}","created_at":"2015-07-17T21:40:55Z","updated_at":"2015-08-05T10:45:38Z","pushed_at":"2015-08-12T11:38:58Z","git_url":"git://github.com/fabric8io/prometheus.git","ssh_url":"git@github.com:fabric8io/prometheus.git","clone_url":"https://github.com/fabric8io/prometheus.git","svn_url":"https://github.com/fabric8io/prometheus","homepage":"http://prometheus.io/","size":8491,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"prometheus:master","ref":"master","sha":"b5861b02aca916543df66d3b6436a30907249a12","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":6838921,"name":"prometheus","full_name":"prometheus/prometheus","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/prometheus","description":"The Prometheus monitoring system and time series database.","fork":false,"url":"https://api.github.com/repos/prometheus/prometheus","forks_url":"https://api.github.com/repos/prometheus/prometheus/forks","keys_url":"https://api.github.com/repos/prometheus/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/prometheus/teams","hooks_url":"https://api.github.com/repos/prometheus/prometheus/hooks","issue_events_url":"https://api.github.com/repos/prometheus/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/prometheus/events","assignees_url":"https://api.github.com/repos/prometheus/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/prometheus/tags","blobs_url":"https://api.github.com/repos/prometheus/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/prometheus/languages","stargazers_url":"https://api.github.com/repos/prometheus/prometheus/stargazers","contributors_url":"https://api.github.com/repos/prometheus/prometheus/contributors","subscribers_url":"https://api.github.com/repos/prometheus/prometheus/subscribers","subscription_url":"https://api.github.com/repos/prometheus/prometheus/subscription","commits_url":"https://api.github.com/repos/prometheus/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/prometheus/merges","archive_url":"https://api.github.com/repos/prometheus/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/prometheus/downloads","issues_url":"https://api.github.com/repos/prometheus/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/prometheus/releases{/id}","created_at":"2012-11-24T11:14:12Z","updated_at":"2015-08-12T12:00:51Z","pushed_at":"2015-08-12T11:38:58Z","git_url":"git://github.com/prometheus/prometheus.git","ssh_url":"git@github.com:prometheus/prometheus.git","clone_url":"https://github.com/prometheus/prometheus.git","svn_url":"https://github.com/prometheus/prometheus","homepage":"http://prometheus.io/","size":18012,"stargazers_count":2742,"watchers_count":2742,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":171,"mirror_url":null,"open_issues_count":96,"forks":171,"open_issues":96,"watchers":2742,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/905"},"html":{"href":"https://github.com/prometheus/prometheus/pull/905"},"issue":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/905"},"comments":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/905/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/905/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/905/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/prometheus/statuses/f78a66a5dc798458c1f7ce654c2aad0541a301ff"}}}}