Skip to content

Commit

Permalink
Update prometheus-configmap.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Donyintao committed Aug 20, 2019
1 parent 6d34d9a commit 5454191
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions prometheus-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,33 @@ data:
- '/etc/prometheus-rules/*.rules'
scrape_configs:
- job_name: 'ingress-nginx-endpoints'
kubernetes_sd_configs:
- role: pod
namespaces:
names:
- ingress-nginx
relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: true
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
action: replace
target_label: __scheme__
regex: (https?)
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
target_label: __address__
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
- source_labels: [__meta_kubernetes_service_name]
regex: prometheus
action: drop
- job_name: kubernetes-apiservers
kubernetes_sd_configs:
- role: endpoints
Expand Down

0 comments on commit 5454191

Please sign in to comment.