try2codesecure / try2codesecure.github.io

:sparkles: Build a beautiful and simple website in literally minutes. Demo at http://deanattali.com/beautiful-jekyll
http://deanattali.com/beautiful-jekyll
0 stars 0 forks source link

posts/monitor-openwrt-nodes-with-prometheus/ #2

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

Monitor OpenWrt nodes with Prometheus | cloudrocket

motivation I’am using OpenWrt for a long time and monitoring of them was always a little bit tricky. It’s getting more complex if you’re going to use more access points. It’s an no brainer since the prometheus-node-exporter scripts exist. openwrt setup install scripts You should start with an up to date OpenWrt router. Install the prometheus node exporter scripts: 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
change listening interface If you use the default config, the node exporter can only be queried from the loopback interface.

https://www.cloudrocket.at/posts/monitor-openwrt-nodes-with-prometheus/

crstian19 commented 3 years ago

Good post! Working on my machine. Thanks a lot!

try2codesecure commented 3 years ago

Glad you like it, any feedback is welcome ;)

rpelissi commented 3 years ago

Thanks for this wonderful and useful dashboard for openwrt! Very useful :)

Cossey commented 3 years ago

Trying the above did not work for me. I noticed the system log displaying daemon.info prometheus-node-exporter-lua: defering start until listen interface lan becomes ready with no connections listening on 9100 when using the netstat -tulpn tool.

The way I fixed this issue is to change the config to option listen_interface '*'. I hope this helps someone.

pewter77 commented 2 years ago

This is great and thank you for this guide, getting me into better monitoring of my own stack. One thing that I've noticed is that transmit and receive bytes and total network traffic are far too high. I believe they're counters and not just data at the time of viewing. I think this actually poses a problem for long term data collection and viewing, especially if the router resets, the number likely resets as well. Something to look into I think!

tompointexe commented 2 years ago

Awesome tutoriel !! works on my OpenWRT Install !! Only question i have is, Is there a way i can get the filesystem stats ?? Thanks

try2codesecure commented 2 years ago

Awesome tutoriel !! works on my OpenWRT Install !! Only question i have is, Is there a way i can get the filesystem stats ?? Thanks

Have you tried the statsd (or textfile) collector? Maybe you get basic filesystem stats from them. I wrote this tutorial partly based on the (little outdated) dragino MS14 (https://openwrt.org/toh/dragino/ms14). But to be honestly, for me it's dispensable to monitor an 16MB "filesystem"

tompointexe commented 2 years ago

Have you tried the statsd (or textfile) collector? Maybe you get basic filesystem stats from them. I wrote this tutorial partly based on the (little outdated) dragino MS14 (https://openwrt.org/toh/dragino/ms14). But to be honestly, for me it's dispensable to monitor an 16MB "filesystem"

No i have not !! i'l look into that next weekend 👀

I just want to have filesystem monitoring as i have 3 LXC containers on the main drive (X86 system), just to know when it will be time to say "Well, let's buy a higher capacity drive" !

darrepac commented 2 years ago

Hi

Is it possible with this setup to have the traffic per ip/mac on our local network. Use case: track down who is f*cking eating the badnwidth ;) It doesn't seem to be the case looking at the screenshot, but...