OpenWRT[Collectd][Flux]

OpenWRT[Collectd][Flux] screenshot 1
OpenWRT[Collectd][Flux] screenshot 2
OpenWRT[Collectd][Flux] screenshot 3
OpenWRT[Collectd][Flux] screenshot 4
OpenWRT[Collectd][Flux] screenshot 5
OpenWRT[Collectd][Flux] screenshot 6
OpenWRT[Collectd][Flux] screenshot 7

Workflow

  • run Collectd in OpenWRT, push data into Telegraf
  • run Telegraf in OpenWRT, push data into InfluxDB2
  • Grafana get data from InfluxDB2 with Flux

Install

  • Create a bucket(openwrt-collectd) + token in organization(monitor) in InfluxDB2
  • Install Collectd package in OpenWRT, enable metric export into Telegraf
  • Install Telegraf pacakge in OpenWRT, enable metric export into InfluxDB2
  • Verify that data is stored in the bucket
  • Create a flux DataSource in Grafana with a token that as read access to the bucket
  • Import this dashboard template

Telegraf

modify /etc/telegraf.conf in OpenWRT

toml
[[outputs.influxdb_v2]]
urls = ["http://your.influxdb.ip:8086"]
token = "==token=="
organization = "monitor"
bucket = "openwrt-collectd"

[[inputs.socket_listener]]
  service_address = "udp://:8094"
  data_format = "collectd"
  collectd_auth_file = "/etc/collectd/collectd.auth"
  collectd_security_level = "encrypt"
  collectd_typesdb = ["/usr/share/collectd/types.db"]
  collectd_parse_multivalue = "split"

Tested On

  • OpenWRT 22.03.4
  • Telegraf package in OpenWRT
  • InfluxDB v2.7.0(docker:docker.io/influxdb)
  • Garfana v9.4.7(docker:docker.io/grafana/grafana-oss)

Contact Me

Revisions
RevisionDescriptionCreated

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies