Influxdata's Telegraf agent on lede?

Hi,

Would it be possible to get the influxdata telegraf agent as a plugin on lede?
It looks to be lightweight and very extensible and can send the stats to a seperate influxdb instance where one can then gather stats from all the other routers as well.

Thanks,

Not easily. Since that lcient is written in Go it requires a special Glibc toolchain. Even if you get it built the resulting binary will likely be >1MB in size which is not execatly lightweight :slight_smile:

If you want only to gather data from LEDE you can use collectd which can write directly to InfluxDB.

This can send to a number of different backends.

1 Like

Thanks Guys!!

I ended up using collectd to push data to influxdb the setup was very simple.
Here is my config for anyone that might been strugling

/etc/collectd.conf

Hostname "hostname"
###FQDNLookup true
BaseDir "/var/run/collectd"
Include "/etc/collectd/conf.d"
PIDFile "/var/run/collectd.pid"
PluginDir "/usr/lib/collectd"
TypesDB "/usr/share/collectd/types.db"
Interval 10
ReadThreads 2

LoadPlugin interface
LoadPlugin load
LoadPlugin ping
LoadPlugin cpu
LoadPlugin memory
LoadPlugin uptime
LoadPlugin processes
LoadPlugin wireless

Interval 10

LoadPlugin "network"
<Plugin "network">
Server "x.x.x.x" "25826"

/etc/influxdb/influxdb.conf

[collectd]

Controls one or many listeners for collectd data.

[[collectd]]
enabled = true
bind-address = ":25826"
database = "collectd"
retention-policy = ""

The collectd service supports either scanning a directory for multiple types

db files, or specifying a single db file.

typesdb = "/usr/share/collectd/types.db"

security-level = "none"

auth-file = "/etc/collectd/auth_file"

These next lines control how batching works. You should have this enabled

otherwise you could get dropped metrics or poor performance. Batching

will buffer points in memory if you have many coming in.

batch-size = 1000 # will flush if this many points get buffered
batch-pending = 5 # number of batches that may be pending in memory
batch-timeout = "1s" # will flush at least this often even if we haven't hit buffer limit
read-buffer = 0 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.

The important thing is to make sure the types.db file is the same on both sides :slight_smile: