Skip to content

Commit

Permalink
Merged prometheus mysql jobs into one
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-vynar committed May 26, 2016
1 parent 12527c7 commit 193955f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ scrape_configs:
- job_name: override
consul_sd_configs:
- server: 'localhost:8500'
services: ['linux', 'mysql-hr', 'mongodb']
services: ['linux', 'mongodb']

relabel_configs:
- source_labels: ['__meta_consul_service']
Expand All @@ -33,6 +33,20 @@ scrape_configs:
replacement: '$1'


- job_name: mysql-hr
consul_sd_configs:
- server: 'localhost:8500'
services: ['mysql-hr']

relabel_configs:
- target_label: 'job'
replacement: 'mysql'
- source_labels: ['__meta_consul_node']
regex: '(.*)'
target_label: 'alias'
replacement: '$1'


- job_name: mysql-mr
scrape_interval: 5s
scrape_timeout: 1s
Expand All @@ -41,6 +55,8 @@ scrape_configs:
services: ['mysql-mr']

relabel_configs:
- target_label: 'job'
replacement: 'mysql'
- source_labels: ['__meta_consul_node']
regex: '(.*)'
target_label: 'alias'
Expand All @@ -56,6 +72,8 @@ scrape_configs:
services: ['mysql-lr']

relabel_configs:
- target_label: 'job'
replacement: 'mysql'
- source_labels: ['__meta_consul_node']
regex: '(.*)'
target_label: 'alias'
Expand Down

0 comments on commit 193955f

Please sign in to comment.