Skip to content

Instantly share code, notes, and snippets.

@lclarkmichalek
Last active February 1, 2017 21:14
Show Gist options
  • Save lclarkmichalek/7f181209166a16d838ef4ca9ab1fdce5 to your computer and use it in GitHub Desktop.
Save lclarkmichalek/7f181209166a16d838ef4ca9ab1fdce5 to your computer and use it in GitHub Desktop.
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 1m
rule_files:
- /etc/prometheus/rules/*.rules
scrape_configs:
- job_name: cadvisor
params:
module:
- cadvisor
metrics_path: /proxy
scheme: http
gce_sd_configs:
- project: XXXX
zone: europe-west1-b
filter: name eq etcd.*
refresh_interval: 1m
port: 9999
tag_separator: ','
- project: XXXX
zone: europe-west1-
filter: name eq etcd.*
refresh_interval: 1m
port: 9999
tag_separator: ','
- project: XXXX
zone: europe-west1-d
filter: name eq etcd.*
refresh_interval: 1m
port: 9999
tag_separator: ','
relabel_configs:
- source_labels: [__meta_gce_tags]
separator: ;
regex: (.*)
target_label: gce_tags
replacement: $1
action: replace
- source_labels: [__meta_gce_zone]
separator: ;
regex: (.+)/([^/]+)$
target_label: gce_zone
replacement: ${2}
action: replace
- source_labels: [__meta_gce_instance_name]
separator: ;
regex: (.*)
target_label: instance
replacement: $1
action: replace
- source_labels: [job] # this relabing rule is here to make it very clear how many times relabing is being applied
separator: ;
regex: (.+)
target_label: job
replacement: $1$1
action: replace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment