bgw320-network-monitor
v0.1.1
Published
Simple BGW320 LAN statistics collector CLI
Downloads
23
Readme
bgw320-network-monitor
Minimal CLI for BGW320 LAN stats.
Setup
npm install
npm run buildRun
npm run collectThe command always fetches:
http://192.168.1.254/cgi-bin/lanstatistics.ha
It writes JSON to stdout.
Save to a file:
npm run collect > snapshot.jsonnpx Usage
After publishing to npm:
npx bgw320-network-monitorSave output:
npx bgw320-network-monitor > snapshot.jsonEvery 5 Minutes
Use cron:
crontab -eAdd:
*/5 * * * * cd /Users/geoff/bgw320-network-monitor && /bin/zsh -lc 'mkdir -p snapshots && npx bgw320-network-monitor > snapshots/snapshot_$(date +\%Y\%m\%d_\%H\%M\%S).json 2>> monitor.err.log'