forked from FF-RGB/ansible
79 lines
1.9 KiB
Django/Jinja
79 lines
1.9 KiB
Django/Jinja
# 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:
|
|
{% if node_targets is defined %}
|
|
- job_name: node
|
|
scheme: https
|
|
basic_auth:
|
|
username: prometheus
|
|
password: {{ prometheus_node_pass }}
|
|
tls_config:
|
|
insecure_skip_verify: true
|
|
static_configs:
|
|
- targets:
|
|
{% for target in node_targets %}
|
|
- {{ target }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if dnsdist_targets is defined %}
|
|
- job_name: dnsdist
|
|
basic_auth:
|
|
username: prometheus
|
|
password: {{ prometheus_dnsdist_pass }}
|
|
static_configs:
|
|
- targets:
|
|
{% for target in dnsdist_targets %}
|
|
- {{ target }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if fastd_targets is defined %}
|
|
- job_name: fastd
|
|
static_configs:
|
|
- targets:
|
|
{% for target in fastd_targets %}
|
|
- {{ target }}
|
|
{% endfor %}
|
|
{% 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
|
|
{% endif %}
|