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
<Plugin syslog>
    LogLevel info
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 interface>
    Interface "eth0"
    IgnoreSelected false
<Plugin load>
    ReportRelative true
<Plugin network>
    Server "localhost" "25826"
<Plugin rrdtool>
    DataDir "/var/lib/collectd/rrd"
<Include "/etc/collectd/collectd.conf.d">
    Filter "*.conf"
LoadPlugin python
<Plugin python>
    ModulePath "/opt/collectd_plugins"
    Import "mpu6050"
    <Module mpu6050>
    Import "cpu_temp"
    <Module cpu_temp>
        Import "relay_states"
        <Module relay_states>
        Import "pwr_states"
        <Module pwr_states>
<Plugin ping>
        Host "yourduet"
        Host "<DEVICE-IPV6>" #the Freifunk router
        Interval 1

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

  • No labels
Write a comment…