61 lines
1.3 KiB
Plaintext
61 lines
1.3 KiB
Plaintext
Hostname "{{ salt['grains.get']('id') }}"
|
|
FQDNLookup false
|
|
Interval 10
|
|
|
|
LoadPlugin logfile
|
|
<Plugin logfile>
|
|
LogLevel info
|
|
File STDOUT
|
|
</Plugin>
|
|
|
|
|
|
{%- for plugin, conf in pillar['collectd'].items() %}
|
|
|
|
{%- if plugin == 'network' and conf == 'client' %}
|
|
LoadPlugin network
|
|
<Plugin network>
|
|
Server "{{ pillar['hosts-inet6']['dn42']['serv']['stats'] }}" "25826"
|
|
</Plugin>
|
|
{%- elif plugin == 'network' and conf == 'server' %}
|
|
LoadPlugin network
|
|
<Plugin network>
|
|
Listen "::" "25826"
|
|
Forward true
|
|
# Downstream at www1.hq.c3d2.de
|
|
Server "172.22.99.28" "25826"
|
|
# Downstream at flatbert.hq.c3d2.de
|
|
Server "172.22.99.11" "25826"
|
|
# Downstream at grafana.hq.c3d2.de
|
|
Server "2a02:8106:208:5201:4042:fbff:fe4b:2de8" "25826"
|
|
</Plugin>
|
|
|
|
{%- elif plugin == 'ping' %}
|
|
LoadPlugin ping
|
|
<Plugin ping>
|
|
{%- for host in conf %}
|
|
Host "{{ host }}"
|
|
{%- endfor %}
|
|
Interval 10
|
|
</Plugin>
|
|
|
|
{%- elif plugin == 'dhcpcount' and conf %}
|
|
LoadPlugin exec
|
|
<Plugin exec>
|
|
Exec "collectd" "/usr/bin/dhcpcount.rb"
|
|
</Plugin>
|
|
|
|
{%- elif conf is mapping %}
|
|
LoadPlugin {{ plugin }}
|
|
|
|
<Plugin {{ plugin }}>
|
|
{%- for k, v in conf.items() %}
|
|
{{ k }} "{{ v }}"
|
|
{%- endfor %}
|
|
</Plugin>
|
|
{%- else %}
|
|
LoadPlugin {{ plugin }}
|
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|