ansible-ffrgb/roles/prometheus/templates/prometheus.yml.j2

68 lines
1.6 KiB
Plaintext
Raw Normal View History

2018-07-19 16:29:44 +02:00
# Sample config for Prometheus.
global:
scrape_interval: 60s
evaluation_interval: 60s
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'example'
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - localhost:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
2020-05-25 15:52:28 +02:00
{% if node_targets is defined %}
2018-07-19 16:29:44 +02:00
- job_name: node
2020-11-23 23:42:15 +01:00
scheme: https
basic_auth:
username: prometheus
password: {{ prometheus_node_pass }}
tls_config:
insecure_skip_verify: true
2018-07-19 16:29:44 +02:00
static_configs:
- targets:
{% for target in node_targets %}
- {{ target }}
2018-07-26 11:32:07 +02:00
{% endfor %}
2020-05-25 15:52:28 +02:00
{% endif %}
{% if fastd_targets is defined %}
2018-07-26 11:32:07 +02:00
- job_name: fastd
static_configs:
- targets:
{% for target in fastd_targets %}
- {{ target }}
2018-07-19 16:29:44 +02:00
{% endfor %}
2020-05-25 15:52:28 +02:00
{% endif %}
{% if pve_targets is defined %}
- job_name: pve
static_configs:
- targets:
{% for target in pve_targets %}
- {{ target }}
{% endfor %}
metrics_path: /pve
params:
module: [default]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9221
2020-05-25 15:52:28 +02:00
{% endif %}