Initial Ansible automation for homelab infrastructure
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets: ['localhost:9093']
|
||||
|
||||
rule_files:
|
||||
- /etc/prometheus/rules/*.yml
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
labels:
|
||||
instance: monitoring
|
||||
|
||||
{% for job in prometheus_scrape_targets %}
|
||||
- job_name: {{ job.job }}
|
||||
static_configs:
|
||||
{% for target in job.targets %}
|
||||
- targets: ['{{ target.address }}']
|
||||
labels:
|
||||
instance: {{ target.host }}
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user