#LDNRealtime Live Router Stats
- Configure your router (I used a Cisco 2621XM) to expose SNMP data on your local subnet. (You can expose it a lot easier potentially, if you have a public IP)
- Edit the "R" value in poller.py and linepoller.py, to set the Router's IP address/
- Install Redis.
- Install SNMP Tools (snmpget)
- Create an Amazon EC2 micro instance.
- Create a VM on a machine inside your network.
- Create some SSH keys on your local VM, and deploy those to login to your EC2 instance passwordlessly.
- Run poller.py and linepoller.py every 30 ish seconds.
- I did this with
watch -n 30 python poller.py
How it works:
- snmpget grabs the counters for fa0/0 and fa0/1.
- Simple code calculates a delta.
- Insanely simple code creates a blob of JSON
- This is saved to a file in
- subprocess shells out to scp, using a public key authentication, and uploads it to the EC2 instance (or wherever you want).
- Apache running on the EC2 instance (with AddType application/json .json) presents it to the GeckoBoard.