SHARE
TWEET

Untitled

a guest Mar 24th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # my global config
  2. global:
  3.   scrape_interval:     1m # Set the scrape interval
  4.   evaluation_interval: 1m # Evaluate rules every N
  5.   # scrape_timeout is set to the global default (10s).
  6.   external_labels:
  7.     monitoring_server: {{ host }}
  8.  
  9. # Alertmanager configuration
  10. alerting:
  11.   alert_relabel_configs:
  12.     - action: labeldrop
  13.       regex: monitoring_server
  14.   alertmanagers:
  15.   - static_configs:
  16.     - targets: {{ _alertmanager_locations | json }}
  17.  
  18. # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
  19. {% if host == federation_master %}
  20. rule_files: []
  21. {% else %}
  22. rule_files:
  23.   - {{ rules|json}}
  24. {% endif %}
  25.  
  26. scrape_configs:
  27. {% if host == federation_master %}
  28.  
  29. {%   for wave in range(10) %}
  30.   - job_name: 'federate--telegraf-nostat-wave{{ wave }}'
  31.     scrape_interval: 1m
  32.     scrape_timeout: 1m
  33.     honor_labels: true
  34.     metrics_path: '/federate'
  35.     params:
  36.       'match[]':
  37.         - '{job="direct-telegraf",hostname=~".+{{ wave }}$",__name__!~"^(procstat|exec_mountstat).+"}'
  38.     static_configs:
  39.       - targets: {{ _federated_prometheus_locations|json }}
  40.  
  41.   - job_name: 'federate--telegraf-stat-wave{{ wave }}'
  42.     scrape_interval: 15m
  43.     scrape_timeout: 5m
  44.     honor_labels: true
  45.     metrics_path: '/federate'
  46.     params:
  47.       'match[]':
  48.         - '{job="direct-telegraf",hostname=~".+{{ wave }}$",__name__=~"^(procstat|exec_mountstat).+"}'
  49.     static_configs:
  50.       - targets: {{ _federated_prometheus_locations|json }}
  51. {%   endfor %}
  52.  
  53.   - job_name: 'federate--telegraf-nostat-nowave'
  54.     scrape_interval: 1m
  55.     scrape_timeout: 1m
  56.     honor_labels: true
  57.     metrics_path: '/federate'
  58.     params:
  59.       'match[]':
  60.         - '{job="direct-telegraf",hostname!~".+[0-9]$",__name__!~"^(procstat|exec_mountstat).+"}'
  61.     static_configs:
  62.       - targets: {{ _federated_prometheus_locations|json }}
  63.  
  64.   - job_name: 'federate--telegraf-stat-nowave'
  65.     scrape_interval: 15m
  66.     scrape_timeout: 3m
  67.     honor_labels: true
  68.     metrics_path: '/federate'
  69.     params:
  70.       'match[]':
  71.         - '{job="direct-telegraf",hostname!~".+[0-9]$",__name__=~"^(procstat|exec_mountstat).+"}'
  72.     static_configs:
  73.       - targets: {{ _federated_prometheus_locations|json }}
  74.  
  75.   - job_name: 'federate--prometheus'
  76.     scrape_interval: 1m
  77.     scrape_timeout: 1m
  78.     honor_labels: true
  79.     metrics_path: '/federate'
  80.     params:
  81.       'match[]':
  82.         - '{job="prometheus"}'
  83.     static_configs:
  84.       - targets: {{ _other_prometheus_locations|json }}
  85.  
  86.   - job_name: 'snmp'
  87.     metrics_path: /snmp
  88.     params:
  89.       module: [ciscosw]
  90.     file_sd_configs:
  91.       - files:
  92.         -  {{ inventory['cisco'] }}
  93.     relabel_configs:
  94.       - source_labels: [__address__]
  95.         target_label: __param_target
  96.       - source_labels: [__param_target]
  97.         target_label: instance
  98.       - target_label: __address__
  99.         replacement: {{ snmp_exporter_host }}
  100.  
  101. {% else %}
  102.   - job_name: 'direct-telegraf'
  103.     honor_labels: true
  104.     file_sd_configs:
  105.       - files:
  106.         - {{ inventory['machines'] }}
  107. {% endif %}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top