r/scrape-collectd: collectd scrape targets config
The *scrape-collectd* role generates the `/etc/prometheus/scrape-collectd.yml` file. This file can be read by Prometheus/Victoria Metrics/vmagent to identify the hosts running *collectd* with the *write_prometheus* plugin, using the `files_sd_configs` scrape configuration option. All hosts in the *collectd-prometheus* group are listed as scrape targets.
This commit is contained in:
2
roles/scrape-collectd/vars/main.yml
Normal file
2
roles/scrape-collectd/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
scrape_collectd_config:
|
||||
- targets: '{{ groups["collectd-prometheus"] }}'
|
||||
Reference in New Issue
Block a user