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


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.

Restart the node_exporter service.

/etc/init.d/prometheus-node-exporter-lua restart

Test again

curl # the lan ip of your router

or you can open a browser

That’s all.