OpenWrt & Prometheus & Grafana

 

OpenWrt auf einem Ubiquiti UniFi AC Lite, Prometheus und Grafana auf einem Ubuntu-Server, da freut sich das Statistikerherz. 🙂

Installation auf der Serverversion Ubuntu 24.04 LTS.


Prometheus installieren:
apt -y install prometheus prometheus-node-exporter
Konfiguration anpassen:
vi /etc/prometheus/prometheus.yml
Grafana installieren:
wget -q -O /usr/share/keyrings/grafana.key https://packages.grafana.com/gpg.key
echo „deb [signed-by=/usr/share/keyrings/grafana.key] https://packages.grafana.com/oss/deb stable main“ | tee -a /etc/apt/sources.list.d/grafana.list
apt update
apt -y install grafana
Konfiguration anpassen:
vi /etc/grafana/grafana.ini
Weiter geht’s zum Beispiel auf Server World.


Ubiquiti UniFi AC Lite anpassen:
Erstellen einer angepassten Firmware mit dem Image Builder auf Distro: Linux Mint 21.3 Virginia Base: Ubuntu 22.04 jammy als Root.


apt install build-essential file libncurses-dev zlib1g-dev gawk git \
gettext libssl-dev xsltproc rsync wget unzip python3 python3-distutils

Downloaden und mit „tar – -zstd -xvf openwrt-imagebuilder-24.10.3-ath79-generic.Linux-x86_64.tar.zst“ entpacken und mit cd openwrt-imagebuilder ins Verzeichnis wechseln und die Firmware erstellen.

make -j4 image PROFILE=ubnt_unifiac-lite PACKAGES=“-ath10k-firmware-qca988x-ct ath10k-firmware-qca988x -kmod-ath10k-ct kmod-ath10k luci luci-i18n-base-de luci-i18n-firewall-de luci-i18n-package-manager-de -wpad-basic-mbedtls wpad-mesh-openssl px5g-mbedtls kmod-hwmon-core kmod-crypto-acompress kmod-lib-lzo 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“


Diese findet sich dann im Verzeichnis „openwrt-imagebuilder-24.10.3-ath79-generic.Linux-x86_64“.

Wenn der Access Point mit OpenWrt geflasht ist, muß noch die „prometheus-node-exporter-lua“ angepasst werden.
„vi prometheus-node-exporter-lua“


Eine Alternative wäre da z.B. Netdata.