Monitoring and alerting | collectd
apt install collectd
vim /etc/collectd/collectd.conf
FQDNLookup true
BaseDir "/var/lib/collectd"
PluginDir "/usr/lib/collectd"
TypesDB "/usr/share/collectd/types.db"
LoadPlugin syslog
MaxPacketSize 1452
<Plugin syslog>
LogLevel info
</Plugin>
LoadPlugin battery
LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin entropy
LoadPlugin interface
LoadPlugin irq
LoadPlugin load
LoadPlugin memory
LoadPlugin network
LoadPlugin ping
LoadPlugin processes
LoadPlugin rrdtool
LoadPlugin swap
LoadPlugin users
LoadPlugin uptime
<Plugin df>
FSType rootfs
FSType sysfs
FSType proc
FSType devtmpfs
FSType devpts
FSType tmpfs
FSType fusectl
FSType cgroup
IgnoreSelected true
</Plugin>
<Plugin interface>
Interface "eth0"
IgnoreSelected false
</Plugin>
<Plugin load>
ReportRelative true
</Plugin>
<Plugin network>
Server "localhost" "25826"
</Plugin>
<Plugin rrdtool>
DataDir "/var/lib/collectd/rrd"
</Plugin>
<Include "/etc/collectd/collectd.conf.d">
Filter "*.conf"
</Include>
LoadPlugin python
<Plugin python>
ModulePath "/opt/collectd_plugins"
Import "mpu6050"
<Module mpu6050>
</Module>
Import "cpu_temp"
<Module cpu_temp>
</Module>
Import "relay_states"
<Module relay_states>
</Module>
Import "pwr_states"
<Module pwr_states>
</Module>
</Plugin>
<Plugin ping>
Host "yourduet"
Host "<DEVICE-IPV6>" #the Freifunk router
Interval 1
</Plugin>
Ping Plugin
We use this plugin to test if Duet and the gateway router are online. If one of the ping hosts is unavailable it will create a massive output in InfluxDB error log because collectd messes around with NaN values which InfluxDB cannot handle.
collectd name=ping_value error="NaN is an unsupported value for field value"
You can safely ignore this. See also https://github.com/influxdata/influxdb/issues/4874
Keine Kommentare vorhanden
Keine Kommentare vorhanden