64 lines
1.8 KiB
Django/Jinja
64 lines
1.8 KiB
Django/Jinja
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).
|
|
|
|
# The labels to add to any time series or alerts when communicating with
|
|
# external systems (federation, remote storage, Alertmanager).
|
|
external_labels:
|
|
monitor: 'master'
|
|
|
|
{% if prometheus_rule_files is defined %}
|
|
# Rule files specifies a list of files from which rules are read.
|
|
rule_files:
|
|
{% for (key, value) in prometheus_rule_files.items() %}
|
|
- {{ prometheus_rule_path }}/{{ value.dest }}
|
|
{% 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"
|
|
scheme: "https"
|
|
static_configs:
|
|
{%for group in prometheus_groups %}
|
|
- targets:
|
|
{% for host in groups[group] %}
|
|
- '{{ host }}:9100'
|
|
{% endfor %}
|
|
labels:
|
|
group: '{{ group }}'
|
|
{% endfor %}
|
|
|
|
- job_name: "icmp6"
|
|
metrics_path: /probe
|
|
params:
|
|
module: ["icmp6"]
|
|
static_configs:
|
|
- targets:
|
|
{%for group in prometheus_groups %}
|
|
{% for host in groups[group] %}
|
|
{% if host != inventory_hostname %}
|
|
- "{{ host.rsplit('.freifunk-mwu.de')[0] }}.ffwi.org"
|
|
- "{{ host.rsplit('.freifunk-mwu.de')[0] }}.ffmz.org"
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% for host, _ in bgp_mwu_servers.items() %}
|
|
- "{{ host }}.ffwi.org"
|
|
- "{{ host }}.ffmz.org"
|
|
{% 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
|