r/collectd-prometheus: Allow scraping from outside

The *collectd-prometheus* role now has a
`collectd_prometheus_allow_outsize` variable.  This variable controls
whether or not external hosts are allowed to scrape data from *collectd*.
When set to `false`, as is the default value, *collectd* will be
configured to listen on the loopback interface only, and the TCP port
will not be opened in the firewall.
This commit is contained in:
2021-10-30 16:34:25 -05:00
parent 3127b9b8f7
commit b78af05fd8
3 changed files with 21 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ LoadPlugin write_prometheus
{% endif %}
<Plugin write_prometheus>
Port {{ collectd_prometheus_port }}
{% if collectd_prometheus_host is defined %}
{% if collectd_prometheus_host|d %}
Host "{{ collectd_prometheus_host }}"
{% endif %}
</Plugin>