roles/collectd: Support setting server interface

For hosts with multiple network interfaces, collectd may not send
multicast messages through the correct interface.  To ensure that it
does, the `Interface` configuration option can be specified with each
`Server` option.  To define this option, entries in the
`collectd_network_servers` list can now have an `interface` property.
jenkins-master
Dustin 2020-12-23 20:54:48 -06:00
parent 4a4f984f1f
commit 8d442b2aaf
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,10 @@ LoadPlugin network
{% for server in collectd_network_servers %}
{% if server is string %}
Server "{{ server }}"
{% elif server.interface is defined %}
<Server "{{ server.host }}"{% if server.port is defined %} {{ server.port }}{% endif %}>
Interface "{{ server.interface }}"
</Server>
{% else %}
Server "{{ server.host }}" {{ server.port }}
{% endif %}