OpenWRT[Collectd][Flux]
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
[[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
Data source config
Collector config:
Upload an updated version of an exported dashboard.json file from Grafana
Revision | Description | Created | |
---|---|---|---|
Download |