Hostname "{{ salt['grains.get']('id') }}" FQDNLookup false Interval 10 LoadPlugin logfile LogLevel info File STDOUT {%- for plugin, conf in pillar['collectd'].items() %} {%- if plugin == 'network' and conf == 'client' %} LoadPlugin network Server "{{ pillar['hosts-inet6']['dn42']['serv']['stats'] }}" "25826" {%- elif plugin == 'network' and conf == 'server' %} LoadPlugin network Listen "::" "25826" Forward true Server "{{ pillar['hosts-inet']['serv']['spaceapi'] }}" "25826" Server "{{ pillar['hosts-inet']['serv']['grafana'] }}" "25826" {%- elif plugin == 'ping' %} LoadPlugin ping {%- for host in conf %} Host "{{ host }}" {%- endfor %} Interval 10 {%- elif plugin == 'dhcpcount' and conf %} {%- set timeout = 180 %} {%- for iface, ips in salt['grains.get']('ip_interfaces').items() %} {%- set dhcp_conf = pillar['dhcp'].get(iface) %} {%- if dhcp_conf and dhcp_conf.get('time') and dhcp_conf.get('time') > timeout %} {%- set timeout = dhcp_conf['time'] %} {%- endif %} {%- endfor %} LoadPlugin exec Exec "nobody" "/usr/bin/dhcpcount.rb" "{{ timeout }}" {%- elif conf is mapping %} LoadPlugin {{ plugin }} {%- for k, v in conf.items() %} {{ k }} "{{ v }}" {%- endfor %} {%- else %} LoadPlugin {{ plugin }} {%- endif %} {%- endfor %}