I recently just finished the development of monitoring 17 Brocade
fibre channel switches with over 1200+ ports in total. The implementation is solely based on UNIX shell script
, Apache Web Server
by polling the switches using SNMP
Instead of polling individual port, we 'snmpwalk' the swFCPortTxWords (188.8.131.52.4.1.15184.108.40.206.220.127.116.11.11) and swFCPortRxWords (18.104.22.168.4.1.1522.214.171.124.126.96.36.199.12) MIB branches. With this, we only have to do two polls per switch. The output will be parsed by a Tcl program to output 'update somefile.rrd N:value' data stream and pipe it to 'rrdtool -' to update all the rrd files in one parse. Here is a sample pseudo code
for switch in $all_switches
for mib in swFCPortTxWords swFCPortRxWords
snmpwalk -v $version -c $community $switch $mib | tcl-program
# expected output: "update somefile.rrd N:value"
done | rrdtool -
All these runs on Solaris. BTW, the search form allows you to key in search patten using regular expression. The return page provides a summary plot link to aggregate all traffic in one plot.
Below shows some of the screen dump.
Main page shows all the switches.
Click on the 4th switch and this will show you all the FC ports:
Click on the 4th port in the 4th switch. It shows you the daily, weekly, monthly and yearly Tx/Rx traffic
If you use the search form, which can take regular expression, it returns the matching switch ports. The result page will include a Summary plot link to allow user to put all the traffic in one single page.
A daily summary plot
A weekly summary plot
Labels: Apache, RRDtool, shell script, Tcl