2025-07-12 23:41:13 -04:00

15 lines
352 B
Django/Jinja

#jinja2: trim_blocks: True, lstrip_blocks: True
global:
scrape_interval: "15s"
scrape_configs:
- job_name: node
metrics_path: /metrics
scheme: http
static_configs:
{% for host in groups['vms'] %}
- targets: ['{{ hostvars[host].ansible_host }}:9100']
labels:
instance_name: '{{ host }}'
{% endfor %}