Telegraf

Telegraf is a plugin-driven agent for collecting and sending metrics and events. It supports various inputs (including Prometheus endpoints) and can send data into InfluxDB. More inforamtion on telegraf's website: https://www.influxdata.com/time-series-platform/telegraf/

At the 20th of October the first telegraf was merged into the package repository. If you use the openwrt snapshot packages, you can install telegraf with the following commands.

To install the full version use the package telegraf-full.

opkg install telegraf-full

To use a smaller version (around 27M when installing with `opkg` and around 6M when including into squashfs) use the package `telegraf`

opkg install telegraf

The reduced version includes:

Aggregators:

  • None

Inputs:

  • cpu
  • ethtool
  • internal
  • interrupts
  • ipset
  • iptables
  • kernel
  • mem
  • net
  • net_response
  • ping
  • processes
  • procstat
  • prometheus
  • sensors
  • snmp
  • socket_listener
  • swap
  • syslog
  • system
  • tail
  • tcp_listener
  • udp_listener
  • wireguard
  • wireless

Outputs:

  • exec
  • file
  • graphite
  • http
  • influxdb
  • prometheus_client
  • syslog

Processors:

  • None

Since version 1.20.3 the configuration file is stored at /etc/telegraf.conf. By default, the provided telegraf configuration file is deployed. You can find it here or in the package.

Changes in the configuration file will not be overwritten by updates of the package.

After changing the configuration the service needs to be restarted or you can reload the configuration.

To test the current configuration the following command can be used:

telegraf --test --config /etc/telegraf.conf

To limit the test to a specific plugin use:

telegraf --test --config /etc/telegraf.conf --input-filter <FILTER-NAME>  --output-filter <FILTER-NAME>

For the further configuration see the official telegraf documentation.

The telegraf service is managed via a init.d script.

The following command are available:

  • start
  • stop
  • restart
  • enable (autostart on bootup)
  • disable (autostart on bootup)
  • reload (configuration)
/etc/init.d/telegraf <COMMAND>
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2021/12/26 19:35
  • by jonnytischbein