{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/4052","repository_url":"https://api.github.com/repos/prometheus/prometheus","labels_url":"https://api.github.com/repos/prometheus/prometheus/issues/4052/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/4052/comments","events_url":"https://api.github.com/repos/prometheus/prometheus/issues/4052/events","html_url":"https://github.com/prometheus/prometheus/issues/4052","id":311882146,"number":4052,"title":"Custom metric path does not work","user":{"login":"dbluxo","id":20679842,"avatar_url":"https://avatars3.githubusercontent.com/u/20679842?v=4","gravatar_id":"","url":"https://api.github.com/users/dbluxo","html_url":"https://github.com/dbluxo","followers_url":"https://api.github.com/users/dbluxo/followers","following_url":"https://api.github.com/users/dbluxo/following{/other_user}","gists_url":"https://api.github.com/users/dbluxo/gists{/gist_id}","starred_url":"https://api.github.com/users/dbluxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbluxo/subscriptions","organizations_url":"https://api.github.com/users/dbluxo/orgs","repos_url":"https://api.github.com/users/dbluxo/repos","events_url":"https://api.github.com/users/dbluxo/events{/privacy}","received_events_url":"https://api.github.com/users/dbluxo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-06T08:03:33Z","updated_at":"2018-04-06T08:27:34Z","closed_at":null,"author_association":"NONE","body":"**What did you do?**\r\n\r\nI've configured a custom service inside kubernetes, with the following annotations:\r\n\r\n```\r\napiVersion: v1\r\nkind: Service\r\nmetadata:\r\n  annotations:\r\n    prometheus.io/scrape: 'true'\r\n    prometheus.io/path: '/custom'\r\n    prometheus.io/port:  '8080'\r\n```\r\n**What did you expect to see?**\r\n\r\nI've configured the following relabel operation inside prometheus.yml, as of:\r\nhttps://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml\r\n\r\n```\r\n  - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]\r\n    action: replace\r\n    target_label: __metrics_path__\r\n    regex: (.+)\r\n```\r\nI'm expecting `__metrics_path__` will be replaced with `/custom`\r\n\r\n**What did you see instead? Under which circumstances?**\r\n\r\n `__metrics_path__`  is still `/metrics` (default)\r\n\r\n**Environment**\r\n\r\nWe are using prometheus 2.2.1 inside kubernetes.\r\n\r\n* System information:\r\n\r\n\tLinux 4.9.75-rancher x86_64\r\n\r\n* Prometheus version:\r\n\r\n\tprometheus, version 2.2.1 (branch: HEAD, revision: bc6058c)\r\n        build user: root@149e5b3f0829\r\n        build date: 20180314-14:15:45\r\n        go version: go1.10\r\n"},"comment":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/comments/379184910","html_url":"https://github.com/prometheus/prometheus/issues/4052#issuecomment-379184910","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/4052","id":379184910,"user":{"login":"dbluxo","id":20679842,"avatar_url":"https://avatars3.githubusercontent.com/u/20679842?v=4","gravatar_id":"","url":"https://api.github.com/users/dbluxo","html_url":"https://github.com/dbluxo","followers_url":"https://api.github.com/users/dbluxo/followers","following_url":"https://api.github.com/users/dbluxo/following{/other_user}","gists_url":"https://api.github.com/users/dbluxo/gists{/gist_id}","starred_url":"https://api.github.com/users/dbluxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbluxo/subscriptions","organizations_url":"https://api.github.com/users/dbluxo/orgs","repos_url":"https://api.github.com/users/dbluxo/repos","events_url":"https://api.github.com/users/dbluxo/events{/privacy}","received_events_url":"https://api.github.com/users/dbluxo/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T08:27:34Z","updated_at":"2018-04-06T08:27:34Z","author_association":"NONE","body":"Yes of course:\r\n\r\n<img width=\"1044\" alt=\"service_discovery\" src=\"https://user-images.githubusercontent.com/20679842/38410495-03b8c5d0-3985-11e8-8098-4200c0a8c484.png\">\r\n"}}
{"actor":{"display_login":"dbluxo"}}