Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #133 from alexbrand/fix-scrape
Browse files Browse the repository at this point in the history
prometheus: envoy-statsd job ignore pods that don't have the statsd port annotation
  • Loading branch information
stevesloka authored Jun 1, 2018
2 parents 3fbc1a3 + daa6c9e commit 4c5b4cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deployment/prometheus/02-prometheus-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ data:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: true
# Only scrape pods that have the statsdport annotation set to a number
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_statsdport]
action: keep
regex: ^\d+$
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_statsdport]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
Expand Down

0 comments on commit 4c5b4cf

Please sign in to comment.