| LoadPlugin network |
| {%- for plugin in pillar.collectd.client.plugins %} |
| {%- if plugin_name == plugin.name %} |
| <Plugin "network"> |
| {% if plugin.mode == 'client' %} |
| Server "{{ plugin.host }}" "{{ plugin.port }}" |
| # <Server "{{ plugin.host }}" "{{ plugin.port }}"> |
| # SecurityLevel Encrypt |
| # Username "{{ plugin.user }}" |
| # Password "{{ plugin.password }}" |
| # </Server> |
| TimeToLive 128 |
| {% endif %} |
| {% if plugin.mode == 'server' %} |
| Listen "{{ plugin.host }}" "{{ plugin.port }}" |
| # <Listen "{{ plugin.host }}" "{{ plugin.port }}"> |
| # SecurityLevel Sign |
| # AuthFile "/etc/collectd/passwd" |
| # Interface "{{ plugin.interface }}" |
| # </Listen> |
| MaxPacketSize 1024 |
| {% endif %} |
| |
| # # proxy setup (client and server as above): |
| # Forward true |
| # |
| # # statistics about the network plugin itself |
| # ReportStats false |
| # |
| # # "garbage collection" |
| # CacheFlush 1800 |
| </Plugin> |
| {%- endif %} |
| {%- endfor %} |