Kubernetes SD: Update config for discovery in 1.3

This commit is contained in:
Jimmi Dyson 2016-11-02 15:06:20 +00:00
parent 6703404cb4
commit 4d37dca669
No known key found for this signature in database
GPG key ID: 978CD4AF4C1E87F5

View file

@ -5,9 +5,9 @@
# Kubernetes labels will be added as Prometheus labels on metrics via the # Kubernetes labels will be added as Prometheus labels on metrics via the
# `labelmap` relabeling action. # `labelmap` relabeling action.
# Scrape config for cluster components. # Scrape config for API servers.
scrape_configs: scrape_configs:
- job_name: 'kubernetes-cluster' - job_name: 'kubernetes-apiservers'
# Default to scraping over https. If required, just disable this or change to # Default to scraping over https. If required, just disable this or change to
# `http`. # `http`.
@ -28,11 +28,9 @@ scrape_configs:
# insecure_skip_verify: true # insecure_skip_verify: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs: static_configs:
- api_servers: - targets:
- 'https://kubernetes.default.svc' - kubernetes.default.svc
in_cluster: true
role: apiserver
- job_name: 'kubernetes-nodes' - job_name: 'kubernetes-nodes'
@ -56,10 +54,7 @@ scrape_configs:
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs: kubernetes_sd_configs:
- api_servers: - role: node
- 'https://kubernetes.default.svc'
in_cluster: true
role: node
relabel_configs: relabel_configs:
- action: labelmap - action: labelmap
@ -79,10 +74,7 @@ scrape_configs:
- job_name: 'kubernetes-service-endpoints' - job_name: 'kubernetes-service-endpoints'
kubernetes_sd_configs: kubernetes_sd_configs:
- api_servers: - role: endpoints
- 'https://kubernetes.default.svc'
in_cluster: true
role: endpoint
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
@ -123,10 +115,7 @@ scrape_configs:
module: [http_2xx] module: [http_2xx]
kubernetes_sd_configs: kubernetes_sd_configs:
- api_servers: - role: service
- 'https://kubernetes.default.svc'
in_cluster: true
role: service
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
@ -156,10 +145,7 @@ scrape_configs:
- job_name: 'kubernetes-pods' - job_name: 'kubernetes-pods'
kubernetes_sd_configs: kubernetes_sd_configs:
- api_servers: - role: pod
- 'https://kubernetes.default.svc'
in_cluster: true
role: pod
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]