Integrated Node Exporter on Openwrt

Prerequisites You should have a public IP address for your router, or you should use the DDNS to do a port forward to your router. Interacting with OpenWrt login in your router opkg update opkg install prometheus-node-exporter-lua opkg install prometheus-node-exporter-lua-nat_traffic opkg install prometheus-node-exporter-lua-netstat opkg install prometheus-node-exporter-lua-openwrt opkg install prometheus-node-exporter-lua-wifi opkg install prometheus-node-exporter-lua-wifi_stations test curl localhost:9100/metrics change the port and interface vim /etc/config/prometheus-node-exporter-lua You will see the contents as follow. config prometheus-node-exporter-lua 'main' option listen_ipv6 '0' option listen_port '9100' option listen_interface 'lan' change the listen_interface to lan which already changed and showed above....

December 29, 2022 · 1 min · Jingwei Lei

How to Deploy Prometheus on Your Server

Download all required packages Go to the download page, find these packages as below, https://prometheus.io/download/ Prometheus https://github.com/prometheus/prometheus/releases/download/v2.37.5/prometheus-2.37.5.linux-amd64.tar.gz Alertmanager https://github.com/prometheus/alertmanager/releases/download/v0.24.0/alertmanager-0.24.0.linux-amd64.tar.gz Node_exporter https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz Allow 9090 port open ufw allow 9090/tcp ufw reload Configure and start tar xvfz prometheus-2.37.5.linux-amd64.tar.gz cd prometheus-2.37.5.linux-amd64/ mv prometheus-2.37.5.linux-amd64 /usr/local/prometheus useradd -M -s /sbin/nologin prometheus cd /usr/local/prometheus mkdir data chown -R prometheus:prometheus /usr/local/prometheus Add to system service [Unit] Description=Prometheus After=network.target [Service] User=prometheus Group=prometheus WorkingDirectory=/usr/local/prometheus ExecStart=/usr/local/prometheus/prometheus [Install] WantedBy=multi-user.target Save the file to /usr/lib/systemd/system/prometheus....

December 18, 2022 · 3 min · Jingwei Lei