2018-10-06 22:19:37 +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:
|
|
|
|
{% if node_targets is defined %}
|
2020-05-25 16:15:29 +02:00
|
|
|
- job_name: node
|
2018-10-06 22:19:37 +02:00
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
{% for target in node_targets %}
|
|
|
|
- {{ target }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2020-05-25 16:15:29 +02:00
|
|
|
{% 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 %}
|