Files
configpolicy/roles/collectd/templates/collectd-network.conf.j2
Dustin C. Hatch 8d442b2aaf 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.
2020-12-23 20:54:48 -06:00

25 lines
648 B
Django/Jinja

{% if collectd_load_network_plugin %}
LoadPlugin network
{% endif %}
<Plugin 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 %}
{% endfor %}
{% for listen in collectd_network_listen %}
{% if listen is string %}
Listen "{{ listen }}"
{% else %}
Listen "{{ listen.host }}" {{ listen.port}}
{% endif %}
{% endfor %}
</Plugin>