There are optional packages that allow you to install SNMP and NetFlow agents on CeroWrt.
The Automated Configuration of CeroWrt page provides a script that (optionally) performs both these actions as well as allowing you to configure other aspects of your router in a single step. For reference, the GUI process for enabling SNMP and NetFlow procedures are documented here.
The Simple Network Management Protocol (SNMP) is a protocol that allows network management stations to retrieve operational statistics from CeroWrt. The snmpd package implements MIB-II for traffic statistics and system information; IF-MIB for detailed information about high-speed interfaces; the UCD-SNMP and Host Resources MIBs for processor, disk, and memory utilizations. To install and configure SNMP:
/etc/init.d/snmpd start
/etc/init.d/snmpd enable
NB: the snmp data apparently only gets updated every 15-30 seconds. Consequently, it gives inaccurate results if it is probed more frequently. (This is especially obvious if you look at traffic counters. Two queries a few seconds apart retrieve the same value, thus the computed data rate appears to be zero. This is a known flaw in the OpenWrt package as well.)
NetFlow is a Cisco protocol that permits a router or switch to send (export) a summary of recent traffic to a database (a NetFlow collector) for analysis. The NetFlow data allows a network manager to see who’s sending or receiving traffic, what port(s) are being used, and make other judgements about network traffic.
fprobe is a CeroWrt package that makes the router act as a NetFlow exporter. To install and configure fprobe to send data to your designated collector address on port 2055:
fprobe -i ge00 -f ip -d 15 -e 60 localhost:2055
For more information, read the document:“fprobe man page”
The following shell script automates the installation and configuration of snmpd and fprobe. The comments at the top show how to ssh into the router, paste the script into a file in /tmp, then run that file. Note that you should change 192.168.1.1 in both fprobe commands to the address of your own NetFlow collector.
The script has been moved to the Automated Configuration of CeroWrt page.