Created
June 30, 2018 02:17
-
-
Save diogok/a6b2501aefc5d951c1ca2112d0ac6f05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
scrape_interval: 5s | |
scrape_configs: | |
- job_name: 'services' | |
consul_sd_configs: | |
- server: 'host:8500' | |
relabel_configs: | |
- source_labels: [__meta_consul_tags] | |
regex: .*,prometheus,.* | |
action: keep | |
- source_labels: [__meta_consul_service] | |
target_label: job | |
- source_labels: [__meta_consul_tags] | |
regex: .*,prometheus.metrics_path=([^,]+),.* | |
replacement: '${1}' | |
target_label: __metrics_path__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment