- backup role emits last-success/run metrics into node_exporter's textfile collector
- node_exporter enables systemd and textfile collectors
- prometheus deploys BackupStale/BackupTimerSilent/SystemdUnitFailed alert rules
- grafana gains Backups - Restic and Systemd dashboards
- fix prometheus.yml params rendering (quote values so {job=...} stays a string)
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
---
|
|
# Prometheus configuration
|
|
# See: https://prometheus.io/docs/prometheus/latest/configuration/configuration/
|
|
|
|
# Scrape interval
|
|
prometheus_scrape_interval: 15s
|
|
prometheus_evaluation_interval: 15s
|
|
|
|
# Retention settings
|
|
prometheus_retention_time: 15d
|
|
prometheus_retention_size: 0
|
|
|
|
# Web interface settings
|
|
prometheus_web_listen_address: "127.0.0.1:9090"
|
|
prometheus_port: 9090
|
|
prometheus_web_external_url: ""
|
|
|
|
# UFW sources allowed to reach the web UI/federation endpoint. Empty means
|
|
# localhost-only; set on VPN-server hosts so a remote Prometheus can federate
|
|
# over the tunnel.
|
|
prometheus_firewall_allowed_sources: []
|
|
|
|
# Storage settings (uses prometheus_data_dir from vars/)
|
|
prometheus_storage_tsdb_path: "{{ prometheus_data_dir }}"
|
|
|
|
# Scrape targets configuration
|
|
# Example:
|
|
# prometheus_scrape_configs:
|
|
# - job_name: 'prometheus'
|
|
# static_configs:
|
|
# - targets: ['localhost:9090']
|
|
# - job_name: 'node_exporter'
|
|
# static_configs:
|
|
# - targets: ['localhost:9100']
|
|
prometheus_scrape_configs:
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090']
|
|
|
|
# Alertmanager configuration (optional)
|
|
# prometheus_alertmanager_configs:
|
|
# - static_configs:
|
|
# - targets: ['localhost:9093']
|
|
prometheus_alertmanager_configs: []
|
|
|
|
# Rule files (optional). The rules directory is always created; drop .yml rule
|
|
# files into /etc/prometheus/rules/ and they are picked up by this glob. The
|
|
# role deploys backup-alerts.yml and systemd-alerts.yml there by default.
|
|
prometheus_rule_files:
|
|
- '/etc/prometheus/rules/*.yml'
|
|
|
|
# Nginx reverse proxy (optional)
|
|
prometheus_nginx_enabled: false
|
|
prometheus_nginx_server_name: prometheus.example.com
|
|
prometheus_nginx_ssl_certificate: /etc/letsencrypt/live/prometheus.example.com/fullchain.pem
|
|
prometheus_nginx_ssl_certificate_key: /etc/letsencrypt/live/prometheus.example.com/privkey.pem
|