{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/948","labels_url":"https://api.github.com/repos/prometheus/prometheus/issues/948/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/948/comments","events_url":"https://api.github.com/repos/prometheus/prometheus/issues/948/events","html_url":"https://github.com/prometheus/prometheus/pull/948","id":98424370,"number":948,"title":"consul port label","user":{"login":"Marmelatze","id":199681,"avatar_url":"https://avatars.githubusercontent.com/u/199681?v=3","gravatar_id":"","url":"https://api.github.com/users/Marmelatze","html_url":"https://github.com/Marmelatze","followers_url":"https://api.github.com/users/Marmelatze/followers","following_url":"https://api.github.com/users/Marmelatze/following{/other_user}","gists_url":"https://api.github.com/users/Marmelatze/gists{/gist_id}","starred_url":"https://api.github.com/users/Marmelatze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marmelatze/subscriptions","organizations_url":"https://api.github.com/users/Marmelatze/orgs","repos_url":"https://api.github.com/users/Marmelatze/repos","events_url":"https://api.github.com/users/Marmelatze/events{/privacy}","received_events_url":"https://api.github.com/users/Marmelatze/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-31T16:27:08Z","updated_at":"2015-07-31T19:15:17Z","closed_at":"2015-07-31T16:35:26Z","pull_request":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/948","html_url":"https://github.com/prometheus/prometheus/pull/948","diff_url":"https://github.com/prometheus/prometheus/pull/948.diff","patch_url":"https://github.com/prometheus/prometheus/pull/948.patch"},"body":"I found a problem while trying to relabel a target from consul. The port seem to be some random string and not the numeric port (see attached screenshot).\r\n![screenshot 2015-07-31 18 17 05](https://cloud.githubusercontent.com/assets/199681/9011946/3791f88c-37b1-11e5-9c84-de7f61746e85.png)\r\n\r\nMy config:\r\n\r\n```yaml\r\nscrape_configs:\r\n- job_name: cadvisor\r\n  consul_sd_configs:\r\n  - server: 'consul:8500'\r\n    services: ['cadvisor']\r\n\r\n  # relabel address to use ServiceAddress instead of Address\r\n  relabel_configs:\r\n  - target_label: __address__\r\n    source_labels: ['__meta_consul_service_address', '__meta_consul_service_port']\r\n    separator: ':'\r\n    regex: '.*'\r\n    replacement: '${0}'\r\n```\r\n\r\nI tried to fix it with a simple int to string conversion and it works for me. I hope it doesn't break things this time ;)"},"comment":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/comments/126788401","html_url":"https://github.com/prometheus/prometheus/pull/948#issuecomment-126788401","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/948","id":126788401,"user":{"login":"fabxc","id":4948210,"avatar_url":"https://avatars.githubusercontent.com/u/4948210?v=3","gravatar_id":"","url":"https://api.github.com/users/fabxc","html_url":"https://github.com/fabxc","followers_url":"https://api.github.com/users/fabxc/followers","following_url":"https://api.github.com/users/fabxc/following{/other_user}","gists_url":"https://api.github.com/users/fabxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fabxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabxc/subscriptions","organizations_url":"https://api.github.com/users/fabxc/orgs","repos_url":"https://api.github.com/users/fabxc/repos","events_url":"https://api.github.com/users/fabxc/events{/privacy}","received_events_url":"https://api.github.com/users/fabxc/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T19:15:17Z","updated_at":"2015-07-31T19:15:17Z","body":"@grobie Wanted to talk to you about test stuff for Prometheus next week\nanyway.\n\nOn Fri, Jul 31, 2015, 9:11 PM Tobias Schmidt <notifications@github.com>\nwrote:\n\n> Yeah I know, it's me again, but shouldn't there a test for that?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/prometheus/prometheus/pull/948#issuecomment-126787786>\n> .\n>\n"}}