EvoBSD/roles/collectd/templates/collectd.conf.j2

142 lines
3.3 KiB
Django/Jinja

Interval {{ collectd_interval }}
Timeout 2
LoadPlugin syslog
<Plugin syslog>
LogLevel warning
</Plugin>
{% if (collectd_plugin_exec_ifq_drops is sameas true) or (collectd_plugin_exec_dns_stats is sameas true) or (collectd_plugin_exec_dhcp_pool is sameas true) %}
<LoadPlugin exec>
Interval {{ collectd_plugin_exec_interval }}
</LoadPlugin>
<Plugin exec>
{% if collectd_plugin_exec_ifq_drops is sameas true %}
Exec "_collectd" "/usr/local/share/collectd/scripts/ifq_drops.sh"
{% endif %}
{% if collectd_plugin_exec_dns_stats is sameas true %}
Exec "_collectd" "/usr/local/share/collectd/scripts/dns_stats.sh"
{% endif %}
{% if collectd_plugin_exec_dhcp_pool is sameas true %}
Exec "_collectd" "/usr/local/share/collectd/scripts/dhcp_pool.pl"
{% endif %}
</Plugin>
{% endif %}
{% if collectd_plugin_cpu is sameas true %}
LoadPlugin cpu
{% endif %}
{% if collectd_plugin_df is sameas true %}
LoadPlugin df
{% endif %}
{% if collectd_plugin_disk is sameas true %}
LoadPlugin disk
{% endif %}
{% if collectd_plugin_interface is sameas true %}
LoadPlugin interface
{% endif %}
{% if collectd_plugin_load is sameas true %}
LoadPlugin load
{% endif %}
{% if collectd_plugin_memory is sameas true %}
LoadPlugin memory
{% endif %}
LoadPlugin network
{% if collectd_plugin_pf is sameas true %}
LoadPlugin pf
{% endif %}
{% if collectd_plugin_processes is sameas true %}
LoadPlugin processes
{% endif %}
{% if collectd_plugin_swap is sameas true %}
LoadPlugin swap
{% endif %}
{% if collectd_plugin_tcpconns is sameas true %}
LoadPlugin tcpconns
{% endif %}
{% if collectd_plugin_uptime is sameas true %}
LoadPlugin uptime
{% endif %}
{% if collectd_plugin_users is sameas true %}
LoadPlugin users
{% endif %}
{% if collectd_plugin_df is sameas true %}
<Plugin df>
# expose host's mounts into container using -v /:/host:ro (location inside container does not matter much)
# ignore rootfs; else, the root file-system would appear twice, causing
# one of the updates to fail and spam the log
## Seems to be fixed with collectd 5.5+
## FSType rootfs
# ignore the usual virtual / temporary file-systems
FSType sysfs
FSType proc
FSType devtmpfs
FSType devpts
FSType tmpfs
FSType fusectl
FSType cgroup
FSType overlay
FSType debugfs
FSType pstore
FSType securityfs
FSType hugetlbfs
FSType squashfs
FSType mqueue
IgnoreSelected true
ReportByDevice false
ReportInodes true # Default false
ValuesAbsolute true
ValuesPercentage true
</Plugin>
{% endif %}
{% if collectd_plugin_disk is sameas true %}
<Plugin "disk">
#Disk "/^[hsv]d[a-z]/"
IgnoreSelected false
</Plugin>
{% endif %}
{% if collectd_plugin_cpu is sameas true %}
<Plugin cpu>
ValuesPercentage true
</Plugin>
{% endif %}
{% if collectd_plugin_memory is sameas true %}
<Plugin memory>
ValuesPercentage true
</Plugin>
{% endif %}
{% if collectd_plugin_swap is sameas true %}
<Plugin swap>
ValuesPercentage true
</Plugin>
{% endif %}
{% if collectd_plugin_interface is sameas true %}
<Plugin interface>
Interface "/^lo[0-9]*/"
Interface "/^veth.*/"
Interface "/^docker.*/"
IgnoreSelected true
ReportInactive false
</Plugin>
{% endif %}
{% if collectd_plugin_tcpconns is sameas true %}
<Plugin "tcpconns">
AllPortsSummary true
</Plugin>
{% endif %}
<Plugin "network">
<Server "{{ collectd_server }}" "25826">
</Server>
</Plugin>