r/scrape-collectd: Also scrape unmanaged targets
The `scrape_collectd_extra_targets` variable can be used to specify a list of additional targets to scrape, in addition to the hosts in the *collectd-prometheus* group. This will allow us to scrape hosts that are not managed by the configuration policy, but still expose Prometheus metrics via collectd.
This commit is contained in:
1
roles/scrape-collectd/defaults/main.yml
Normal file
1
roles/scrape-collectd/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
scrape_collectd_extra_targets: []
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
scrape_collectd_config:
|
scrape_collectd_config:
|
||||||
- targets: '{{ groups["collectd-prometheus"] }}'
|
- targets: '{{ groups["collectd-prometheus"] + scrape_collectd_extra_targets }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user