Realtime bandwidth monitoring with Nagios
-
I wrote these little scripts for monitoring my realtime DL/UL pfsense bandwidth for Nagios and graph them. It can be done with a single script using bash but I decided to use it as an opportunity to brush up my Python. The Python script purely outputs the Mbit/s only and the bash script handles text output and exit codes and Nagios perfdata for graphing. There seems to be a problem with the SNMP octet readout occasionally which causes the speed calculation to yield a negative number, so I made the bash script to output UNKNOWN in those cases so the graph does not get jacked up.
You will need to edit the bash script slightly to identify the location of Python binary, location of Python script and your max bandwidth.
Examples:
./pfsense_bandwidth <hostname>public ifInOctets. <interface number="">./pfsense_bandwidth.py -H <hostname>-C public -I ifInOctets. <interface.number>pfsense_bandwidth.zip</interface.number></hostname></interface></hostname>
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy