Files
oam/knowledge base/openwrt.md
2023-07-14 23:01:16 +02:00

1.7 KiB

OpenWrt

Linux operating system targeting embedded devices, providing a fully writable filesystem with package management.

Table of contents

  1. Monitoring
    1. Prometheus
  2. Further readings
  3. Sources

Monitoring

Prometheus

On the router:

opkg install \
  'prometheus-node-exporter-lua' \
  'prometheus-node-exporter-lua-nat_traffic' \
  'prometheus-node-exporter-lua-netstat' \
  'prometheus-node-exporter-lua-openwrt' \
  'prometheus-node-exporter-lua-wifi' \
  'prometheus-node-exporter-lua-wifi_stations'
sed -E -i'.bak' "s/(option listen_interface) 'loopback'/\1 'lan'/" /etc/config/prometheus-node-exporter-lua
/etc/init.d/prometheus-node-exporter-lua start
curl 'router.fqdn:9100/metrics'

In Prometheus'configuration file:

scrape_configs:
  - job_name: OpenWrt
    static_configs:
      - targets: [ 'router.fqdn:9100' ]

Dashboard for grafana: 11147-openwrt.

Further readings

Sources

All the references in the further readings section, plus the following: