New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus horizontal sharding and federation #43

Open
h0tbird opened this Issue Sep 27, 2016 · 1 comment

Comments

Projects
None yet
1 participant

@h0tbird h0tbird added the enhancement label Sep 27, 2016

@h0tbird h0tbird added this to the v0.2.0 milestone Sep 27, 2016

@h0tbird h0tbird self-assigned this Sep 27, 2016

h0tbird added a commit that referenced this issue Sep 30, 2016

h0tbird added a commit that referenced this issue Sep 30, 2016

@h0tbird

This comment has been minimized.

Copy link
Member Author

h0tbird commented Sep 30, 2016

global:
 external_labels:
  master: 1
 scrape_interval: 1m
 scrape_timeout: 10s
 evaluation_interval: 10s

rule_files:
 - /etc/prometheus/recording.rules
 - /etc/prometheus/alerting.rules

alerting:
 alert_relabel_configs:
 - source_labels: [master]
   action: replace
   replacement: 'all'
   target_label: master

scrape_configs:

 - job_name: 'federate'
   honor_labels: true
   metrics_path: /federate
   params:
    match[]:
     - '{master=~"2|3"}'
   static_configs:
    - targets:
      - 'master-2.cell-1.dub.xnood.com:9191'
      - 'master-3.cell-1.dub.xnood.com:9191'

 - job_name: 'prometheus'
   scrape_interval: 10s
   file_sd_configs:
    - files:
      - /etc/prometheus/targets/prometheus.yml

 - job_name: 'cadvisor'
   scrape_interval: 10s
   file_sd_configs:
    - files:
      - /etc/prometheus/targets/cadvisor.yml
   relabel_configs:
   - source_labels: [__address__]
     modulus: 3
     target_label: __tmp_hash
     action: hashmod
   - source_labels: [__tmp_hash]
     regex: ^0$
     action: keep

 - job_name: 'etcd'
   scrape_interval: 10s
   file_sd_configs:
    - files:
      - /etc/prometheus/targets/etcd.yml
   relabel_configs:
   - source_labels: [__address__]
     modulus: 3
     target_label: __tmp_hash
     action: hashmod
   - source_labels: [__tmp_hash]
     regex: ^0$
     action: keep

 - job_name: 'node'
   scrape_interval: 10s
   file_sd_configs:
    - files:
      - /etc/prometheus/targets/node.yml
   relabel_configs:
   - source_labels: [__address__]
     modulus: 3
     target_label: __tmp_hash
     action: hashmod
   - source_labels: [__tmp_hash]
     regex: ^0$
     action: keep

 - job_name: 'mesos'
   scrape_interval: 10s
   file_sd_configs:
    - files:
      - /etc/prometheus/targets/mesos.yml

 - job_name: 'haproxy'
   scrape_interval: 10s
   file_sd_configs:
    - files:
      - /etc/prometheus/targets/haproxy.yml

 - job_name: 'zookeeper'
   scrape_interval: 10s
   file_sd_configs:
    - files:
      - /etc/prometheus/targets/zookeeper.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment