{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/prometheus-operator/pulls/comments/231096078","pull_request_review_id":171983904,"id":231096078,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTA5NjA3OA==","diff_hunk":"@@ -398,28 +398,36 @@ func (cg *configGenerator) generateServiceMonitorConfig(version semver.Version,\n \n \t// Relabel namespace and pod and service labels into proper labels.\n \trelabelings = append(relabelings, []yaml.MapSlice{\n-\t\t{\n-\t\t\t{Key: \"source_labels\", Value: []string{\"__meta_kubernetes_namespace\"}},\n-\t\t\t{Key: \"target_label\", Value: \"namespace\"},\n-\t\t},\n-\t\t{\n+\t\t{ // Relabel node labels for pre v2.3 meta labels\n \t\t\t{Key: \"source_labels\", Value: []string{\"__meta_kubernetes_endpoint_address_target_kind\", \"__meta_kubernetes_endpoint_address_target_name\"}},\n \t\t\t{Key: \"separator\", Value: \";\"},\n \t\t\t{Key: \"regex\", Value: \"Node;(.*)\"},\n \t\t\t{Key: \"replacement\", Value: \"${1}\"},\n \t\t\t{Key: \"target_label\", Value: \"node\"},\n \t\t},\n-\t\t{\n+\t\t{ // Relabel pod labels for pre v2.3 meta labels\n \t\t\t{Key: \"source_labels\", Value: []string{\"__meta_kubernetes_endpoint_address_target_kind\", \"__meta_kubernetes_endpoint_address_target_name\"}},\n \t\t\t{Key: \"separator\", Value: \";\"},\n \t\t\t{Key: \"regex\", Value: \"Pod;(.*)\"},\n \t\t\t{Key: \"replacement\", Value: \"${1}\"},\n \t\t\t{Key: \"target_label\", Value: \"pod\"},\n \t\t},\n+\t\t{\n+\t\t\t{Key: \"source_labels\", Value: []string{\"__meta_kubernetes_namespace\"}},\n+\t\t\t{Key: \"target_label\", Value: \"namespace\"},\n+\t\t},\n \t\t{\n \t\t\t{Key: \"source_labels\", Value: []string{\"__meta_kubernetes_service_name\"}},\n \t\t\t{Key: \"target_label\", Value: \"service\"},\n \t\t},\n+\t\t{\n+\t\t\t{Key: \"source_labels\", Value: []string{\"__meta_kubernetes_pod_name\"}},\n+\t\t\t{Key: \"target_label\", Value: \"pod\"},\n+\t\t},\n+\t\t{\n+\t\t\t{Key: \"source_labels\", Value: []string{\"__meta_kubernetes_pod_node_name\"}},","path":"pkg/prometheus/promcfg.go","position":37,"original_position":37,"commit_id":"201de19cc65f81264bed64da409baec844ddb89e","original_commit_id":"28cbe8daeed1a073f0d2419ce695cf75e8e7350c","user":{"login":"olvesh","id":220643,"node_id":"MDQ6VXNlcjIyMDY0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/220643?v=4","gravatar_id":"","url":"https://api.github.com/users/olvesh","html_url":"https://github.com/olvesh","followers_url":"https://api.github.com/users/olvesh/followers","following_url":"https://api.github.com/users/olvesh/following{/other_user}","gists_url":"https://api.github.com/users/olvesh/gists{/gist_id}","starred_url":"https://api.github.com/users/olvesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olvesh/subscriptions","organizations_url":"https://api.github.com/users/olvesh/orgs","repos_url":"https://api.github.com/users/olvesh/repos","events_url":"https://api.github.com/users/olvesh/events{/privacy}","received_events_url":"https://api.github.com/users/olvesh/received_events","type":"User","site_admin":false},"body":"I would say that `__meta_kubernetes_POD_node_name` is identifying for the target, as the target is the pod. But I understand that it might change much on cluster rebalances etc, creating many more time-series.\r\nNot sure how bad it will be though, as the \"previous\" time series will go away and a new appear. ","created_at":"2018-11-06T12:00:42Z","updated_at":"2018-11-06T12:00:43Z","html_url":"https://github.com/coreos/prometheus-operator/pull/2089#discussion_r231096078","pull_request_url":"https://api.github.com/repos/coreos/prometheus-operator/pulls/2089","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/coreos/prometheus-operator/pulls/comments/231096078"},"html":{"href":"https://github.com/coreos/prometheus-operator/pull/2089#discussion_r231096078"},"pull_request":{"href":"https://api.github.com/repos/coreos/prometheus-operator/pulls/2089"}},"in_reply_to_id":231025651},"pull_request":{"url":"https://api.github.com/repos/coreos/prometheus-operator/pulls/2089","id":228332228,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MzMyMjI4","html_url":"https://github.com/coreos/prometheus-operator/pull/2089","diff_url":"https://github.com/coreos/prometheus-operator/pull/2089.diff","patch_url":"https://github.com/coreos/prometheus-operator/pull/2089.patch","issue_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/2089","number":2089,"state":"open","locked":false,"title":"Better handling for pod/node labels from ServiceMonitors. ","user":{"login":"olvesh","id":220643,"node_id":"MDQ6VXNlcjIyMDY0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/220643?v=4","gravatar_id":"","url":"https://api.github.com/users/olvesh","html_url":"https://github.com/olvesh","followers_url":"https://api.github.com/users/olvesh/followers","following_url":"https://api.github.com/users/olvesh/following{/other_user}","gists_url":"https://api.github.com/users/olvesh/gists{/gist_id}","starred_url":"https://api.github.com/users/olvesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olvesh/subscriptions","organizations_url":"https://api.github.com/users/olvesh/orgs","repos_url":"https://api.github.com/users/olvesh/repos","events_url":"https://api.github.com/users/olvesh/events{/privacy}","received_events_url":"https://api.github.com/users/olvesh/received_events","type":"User","site_admin":false},"body":"Fixes #2051","created_at":"2018-11-05T12:14:04Z","updated_at":"2018-11-06T12:00:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2565dc2822e0fa2d7818ec0b7535784fc8708afc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/prometheus-operator/pulls/2089/commits","review_comments_url":"https://api.github.com/repos/coreos/prometheus-operator/pulls/2089/comments","review_comment_url":"https://api.github.com/repos/coreos/prometheus-operator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/2089/comments","statuses_url":"https://api.github.com/repos/coreos/prometheus-operator/statuses/201de19cc65f81264bed64da409baec844ddb89e","head":{"label":"olvesh:master","ref":"master","sha":"201de19cc65f81264bed64da409baec844ddb89e","user":{"login":"olvesh","id":220643,"node_id":"MDQ6VXNlcjIyMDY0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/220643?v=4","gravatar_id":"","url":"https://api.github.com/users/olvesh","html_url":"https://github.com/olvesh","followers_url":"https://api.github.com/users/olvesh/followers","following_url":"https://api.github.com/users/olvesh/following{/other_user}","gists_url":"https://api.github.com/users/olvesh/gists{/gist_id}","starred_url":"https://api.github.com/users/olvesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olvesh/subscriptions","organizations_url":"https://api.github.com/users/olvesh/orgs","repos_url":"https://api.github.com/users/olvesh/repos","events_url":"https://api.github.com/users/olvesh/events{/privacy}","received_events_url":"https://api.github.com/users/olvesh/received_events","type":"User","site_admin":false},"repo":{"id":122964236,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI5NjQyMzY=","name":"prometheus-operator","full_name":"olvesh/prometheus-operator","private":false,"owner":{"login":"olvesh","id":220643,"node_id":"MDQ6VXNlcjIyMDY0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/220643?v=4","gravatar_id":"","url":"https://api.github.com/users/olvesh","html_url":"https://github.com/olvesh","followers_url":"https://api.github.com/users/olvesh/followers","following_url":"https://api.github.com/users/olvesh/following{/other_user}","gists_url":"https://api.github.com/users/olvesh/gists{/gist_id}","starred_url":"https://api.github.com/users/olvesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olvesh/subscriptions","organizations_url":"https://api.github.com/users/olvesh/orgs","repos_url":"https://api.github.com/users/olvesh/repos","events_url":"https://api.github.com/users/olvesh/events{/privacy}","received_events_url":"https://api.github.com/users/olvesh/received_events","type":"User","site_admin":false},"html_url":"https://github.com/olvesh/prometheus-operator","description":"Prometheus Operator creates/configures/manages Prometheus clusters atop Kubernetes","fork":true,"url":"https://api.github.com/repos/olvesh/prometheus-operator","forks_url":"https://api.github.com/repos/olvesh/prometheus-operator/forks","keys_url":"https://api.github.com/repos/olvesh/prometheus-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/olvesh/prometheus-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/olvesh/prometheus-operator/teams","hooks_url":"https://api.github.com/repos/olvesh/prometheus-operator/hooks","issue_events_url":"https://api.github.com/repos/olvesh/prometheus-operator/issues/events{/number}","events_url":"https://api.github.com/repos/olvesh/prometheus-operator/events","assignees_url":"https://api.github.com/repos/olvesh/prometheus-operator/assignees{/user}","branches_url":"https://api.github.com/repos/olvesh/prometheus-operator/branches{/branch}","tags_url":"https://api.github.com/repos/olvesh/prometheus-operator/tags","blobs_url":"https://api.github.com/repos/olvesh/prometheus-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/olvesh/prometheus-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/olvesh/prometheus-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/olvesh/prometheus-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/olvesh/prometheus-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/olvesh/prometheus-operator/languages","stargazers_url":"https://api.github.com/repos/olvesh/prometheus-operator/stargazers","contributors_url":"https://api.github.com/repos/olvesh/prometheus-operator/contributors","subscribers_url":"https://api.github.com/repos/olvesh/prometheus-operator/subscribers","subscription_url":"https://api.github.com/repos/olvesh/prometheus-operator/subscription","commits_url":"https://api.github.com/repos/olvesh/prometheus-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/olvesh/prometheus-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/olvesh/prometheus-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/olvesh/prometheus-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/olvesh/prometheus-operator/contents/{+path}","compare_url":"https://api.github.com/repos/olvesh/prometheus-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/olvesh/prometheus-operator/merges","archive_url":"https://api.github.com/repos/olvesh/prometheus-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/olvesh/prometheus-operator/downloads","issues_url":"https://api.github.com/repos/olvesh/prometheus-operator/issues{/number}","pulls_url":"https://api.github.com/repos/olvesh/prometheus-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/olvesh/prometheus-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/olvesh/prometheus-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/olvesh/prometheus-operator/labels{/name}","releases_url":"https://api.github.com/repos/olvesh/prometheus-operator/releases{/id}","deployments_url":"https://api.github.com/repos/olvesh/prometheus-operator/deployments","created_at":"2018-02-26T12:05:22Z","updated_at":"2018-11-06T11:58:22Z","pushed_at":"2018-11-06T11:58:19Z","git_url":"git://github.com/olvesh/prometheus-operator.git","ssh_url":"git@github.com:olvesh/prometheus-operator.git","clone_url":"https://github.com/olvesh/prometheus-operator.git","svn_url":"https://github.com/olvesh/prometheus-operator","homepage":"https://coreos.com/operators/prometheus","size":54462,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"78b37d0af95f97a721479b3c73b38bb9b51bd588","user":{"login":"coreos","id":3730757,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MzA3NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/3730757?v=4","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":68964263,"node_id":"MDEwOlJlcG9zaXRvcnk2ODk2NDI2Mw==","name":"prometheus-operator","full_name":"coreos/prometheus-operator","private":false,"owner":{"login":"coreos","id":3730757,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MzA3NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/3730757?v=4","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/coreos/prometheus-operator","description":"Prometheus Operator creates/configures/manages Prometheus clusters atop Kubernetes","fork":false,"url":"https://api.github.com/repos/coreos/prometheus-operator","forks_url":"https://api.github.com/repos/coreos/prometheus-operator/forks","keys_url":"https://api.github.com/repos/coreos/prometheus-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/prometheus-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/prometheus-operator/teams","hooks_url":"https://api.github.com/repos/coreos/prometheus-operator/hooks","issue_events_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/prometheus-operator/events","assignees_url":"https://api.github.com/repos/coreos/prometheus-operator/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/prometheus-operator/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/prometheus-operator/tags","blobs_url":"https://api.github.com/repos/coreos/prometheus-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/prometheus-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/prometheus-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/prometheus-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/prometheus-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/prometheus-operator/languages","stargazers_url":"https://api.github.com/repos/coreos/prometheus-operator/stargazers","contributors_url":"https://api.github.com/repos/coreos/prometheus-operator/contributors","subscribers_url":"https://api.github.com/repos/coreos/prometheus-operator/subscribers","subscription_url":"https://api.github.com/repos/coreos/prometheus-operator/subscription","commits_url":"https://api.github.com/repos/coreos/prometheus-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/prometheus-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/prometheus-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/prometheus-operator/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/prometheus-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/prometheus-operator/merges","archive_url":"https://api.github.com/repos/coreos/prometheus-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/prometheus-operator/downloads","issues_url":"https://api.github.com/repos/coreos/prometheus-operator/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/prometheus-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/prometheus-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/prometheus-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/prometheus-operator/labels{/name}","releases_url":"https://api.github.com/repos/coreos/prometheus-operator/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/prometheus-operator/deployments","created_at":"2016-09-22T21:38:06Z","updated_at":"2018-11-06T09:52:12Z","pushed_at":"2018-11-06T11:58:20Z","git_url":"git://github.com/coreos/prometheus-operator.git","ssh_url":"git@github.com:coreos/prometheus-operator.git","clone_url":"https://github.com/coreos/prometheus-operator.git","svn_url":"https://github.com/coreos/prometheus-operator","homepage":"https://coreos.com/operators/prometheus","size":54445,"stargazers_count":1937,"watchers_count":1937,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":922,"mirror_url":null,"archived":false,"open_issues_count":250,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":922,"open_issues":250,"watchers":1937,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/prometheus-operator/pulls/2089"},"html":{"href":"https://github.com/coreos/prometheus-operator/pull/2089"},"issue":{"href":"https://api.github.com/repos/coreos/prometheus-operator/issues/2089"},"comments":{"href":"https://api.github.com/repos/coreos/prometheus-operator/issues/2089/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/prometheus-operator/pulls/2089/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/prometheus-operator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/prometheus-operator/pulls/2089/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/prometheus-operator/statuses/201de19cc65f81264bed64da409baec844ddb89e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"olvesh"}}