2017-12-05 05:58:34 +01:00
|
|
|
global:
|
|
|
|
scrape_interval: 15s # By default, scrape targets every 15 seconds.
|
|
|
|
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
|
|
|
|
# scrape_timeout is set to the global default (10s).
|
|
|
|
|
2019-02-15 15:45:38 +01:00
|
|
|
alerting:
|
|
|
|
alertmanagers:
|
|
|
|
- scheme: https
|
|
|
|
path_prefix: /alertmanager/
|
|
|
|
static_configs:
|
|
|
|
- targets: ['{{ http_prometheus_prefix }}.{{ http_domain_external }}']
|
2017-12-05 05:58:34 +01:00
|
|
|
|
|
|
|
{% if prometheus_rule_files is defined %}
|
|
|
|
# Rule files specifies a list of files from which rules are read.
|
|
|
|
rule_files:
|
2019-02-15 15:45:38 +01:00
|
|
|
{% for item in prometheus_rule_files %}
|
|
|
|
- {{ prometheus_rule_path }}/{{ item }}
|
2017-12-05 05:58:34 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
# A list of scrape configurations.
|
|
|
|
scrape_configs:
|
|
|
|
- job_name: 'prometheus'
|
|
|
|
scrape_interval: 10s
|
|
|
|
scrape_timeout: 10s
|
|
|
|
static_configs:
|
|
|
|
- targets: ['localhost:9090']
|
|
|
|
|
|
|
|
- job_name: "node"
|
2019-02-15 15:45:38 +01:00
|
|
|
scheme: "https"
|
|
|
|
static_configs:
|
|
|
|
{%for group in prometheus_groups %}
|
|
|
|
- targets:
|
|
|
|
{% for host in groups[group] %}
|
|
|
|
- '{{ host }}:9100'
|
|
|
|
{% endfor %}
|
|
|
|
labels:
|
|
|
|
group: '{{ group }}'
|
|
|
|
{% endfor %}
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [__address__]
|
|
|
|
regex: '([a-z]+)\..*'
|
|
|
|
replacement: '$1'
|
|
|
|
target_label: hostname
|
|
|
|
|
|
|
|
- job_name: "fastd"
|
|
|
|
scheme: "https"
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
{% for host in groups['ffmwu-gateways'] %}
|
|
|
|
- '{{ host }}:9281'
|
|
|
|
{% endfor %}
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [__address__]
|
|
|
|
regex: '([a-z]+)\..*'
|
|
|
|
replacement: '$1'
|
|
|
|
target_label: hostname
|
|
|
|
|
|
|
|
{% for job in ['icmp4','icmp6'] %}
|
|
|
|
- job_name: "{{ job }}"
|
|
|
|
metrics_path: /probe
|
|
|
|
params:
|
|
|
|
module: ["{{ job }}"]
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
{% for group in prometheus_groups %}
|
|
|
|
{% for host in groups[group] %}
|
|
|
|
{% if host != inventory_hostname %}
|
|
|
|
- "{{ host.rsplit('.')[0] }}.ffwi.org"
|
|
|
|
- "{{ host.rsplit('.')[0] }}.ffmz.org"
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
2019-03-02 18:10:48 +01:00
|
|
|
{% for host, _ in bgp_legacy_servers.items() %}
|
2019-02-15 15:45:38 +01:00
|
|
|
{% if host not in ['extrasahne'] %}
|
|
|
|
- "{{ host }}.ffwi.org"
|
|
|
|
- "{{ host }}.ffmz.org"
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [__address__]
|
|
|
|
target_label: __param_target
|
|
|
|
- source_labels: [__param_target]
|
|
|
|
target_label: instance
|
|
|
|
- target_label: __address__
|
|
|
|
replacement: 127.0.0.1:9115
|
|
|
|
- source_labels: [__param_target]
|
|
|
|
regex: '([a-z]+)\..*'
|
|
|
|
replacement: '$1'
|
|
|
|
target_label: hostname
|
|
|
|
|
|
|
|
{% endfor %}
|