{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/4326","repository_url":"https://api.github.com/repos/prometheus/prometheus","labels_url":"https://api.github.com/repos/prometheus/prometheus/issues/4326/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/4326/comments","events_url":"https://api.github.com/repos/prometheus/prometheus/issues/4326/events","html_url":"https://github.com/prometheus/prometheus/issues/4326","id":336946453,"node_id":"MDU6SXNzdWUzMzY5NDY0NTM=","number":4326,"title":"Kubernetes service discovery can not be detect","user":{"login":"yinwenqin","id":31464022,"node_id":"MDQ6VXNlcjMxNDY0MDIy","avatar_url":"https://avatars1.githubusercontent.com/u/31464022?v=4","gravatar_id":"","url":"https://api.github.com/users/yinwenqin","html_url":"https://github.com/yinwenqin","followers_url":"https://api.github.com/users/yinwenqin/followers","following_url":"https://api.github.com/users/yinwenqin/following{/other_user}","gists_url":"https://api.github.com/users/yinwenqin/gists{/gist_id}","starred_url":"https://api.github.com/users/yinwenqin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yinwenqin/subscriptions","organizations_url":"https://api.github.com/users/yinwenqin/orgs","repos_url":"https://api.github.com/users/yinwenqin/repos","events_url":"https://api.github.com/users/yinwenqin/events{/privacy}","received_events_url":"https://api.github.com/users/yinwenqin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-06-29T10:25:14Z","updated_at":"2018-07-03T01:51:26Z","closed_at":null,"author_association":"NONE","body":"I want to use the prometheus SD to discovery the kube service status,so i found a template of kube service target job,then i add it to configmap. but after reload prometheus,i can't event found the title of the job in prometheus web page ,what's wrong i make ? the other jobs are normal running,except the 'kube service' \r\n\r\nMy kube version is v1.9,here is the target-job template:\r\n\r\n    - job_name: 'kubernetes-services'\r\n      kubernetes_sd_configs:\r\n      - role: service\r\n      metrics_path: /probe\r\n      params:\r\n        module: [http_2xx]\r\n      relabel_configs:\r\n      - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]\r\n        action: keep\r\n        regex: true\r\n      - source_labels: [__address__]\r\n        target_label: __param_target\r\n      - target_label: __address__\r\n        replacement: blackbox-exporter.example.com:9115\r\n      - source_labels: [__param_target]\r\n        target_label: instance\r\n      - action: labelmap\r\n        regex: __meta_kubernetes_service_label_(.+)\r\n      - source_labels: [__meta_kubernetes_namespace]\r\n        target_label: kubernetes_namespace\r\n      - source_labels: [__meta_kubernetes_service_name]\r\n        target_label: kubernetes_name\r\n\r\n\r\n On the prometheu web ui , targets page, i can't find the job name `kubernetes-services` in Targets list which i just add into the configmap,  but the other jobs are normal .\r\n\r\nHere is the jobs in targets page view:\r\n\"\"\"\r\nTargets\r\nfederate (0/1 up) \r\nkubernetes-apiservers (1/1 up) \r\nkubernetes-cadvisor (3/3 up) \r\nkubernetes-node-exporter (3/3 up) \r\nkubernetes-nodes (3/3 up) \r\nkubernetes-service-endpoints (1/5 up) \r\nmysql performance (1/1 up) \r\n“”“\r\nsomebody can help ? If can't even show it,there is no way to customize the rules of kube service"},"comment":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/comments/401988555","html_url":"https://github.com/prometheus/prometheus/issues/4326#issuecomment-401988555","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/4326","id":401988555,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTk4ODU1NQ==","user":{"login":"yinwenqin","id":31464022,"node_id":"MDQ6VXNlcjMxNDY0MDIy","avatar_url":"https://avatars1.githubusercontent.com/u/31464022?v=4","gravatar_id":"","url":"https://api.github.com/users/yinwenqin","html_url":"https://github.com/yinwenqin","followers_url":"https://api.github.com/users/yinwenqin/followers","following_url":"https://api.github.com/users/yinwenqin/following{/other_user}","gists_url":"https://api.github.com/users/yinwenqin/gists{/gist_id}","starred_url":"https://api.github.com/users/yinwenqin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yinwenqin/subscriptions","organizations_url":"https://api.github.com/users/yinwenqin/orgs","repos_url":"https://api.github.com/users/yinwenqin/repos","events_url":"https://api.github.com/users/yinwenqin/events{/privacy}","received_events_url":"https://api.github.com/users/yinwenqin/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T01:51:26Z","updated_at":"2018-07-03T01:51:26Z","author_association":"NONE","body":"@brancz Yes I do,the deployment/rbac/service  kube-resources of prometheus are normal.As mentioned above, in the /targets page, all defined jobs appear like cadvisor/apiserver/node/endpoint/,only except the `kubernetes-services` job.\r\n\r\nroot@yksv001238:~# kubectl get svc -n kube-system | grep  prome\r\nprometheus                ClusterIP   10.109.140.187   <none>        80/TCP                        7d\r\n\r\nroot@yksv001238:~# kubectl get deploy prometheus -n kube-system -o yaml | grep image\r\n        image: prom/prometheus:v2.1.0\r\n        imagePullPolicy: IfNotPresent\r\n\r\n\r\nI have no idea what the problem is.\r\n\r\n"}}
{"actor":{"display_login":"yinwenqin"}}