Bandwidth sensor for PRTG
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
iperfsensor.sh

README.md

iperfsensor for PRTG

License GitHub release

This script runs iPerf to measure bandwidth between two nodes of a network, and reports the results in a format compatible with PRTG's SSH Script Advanced sensor.

It has minimal dependancies and even works on a router flashed with the open-source Tomato firmware.

Gauges

Prerequisites

  1. Ensure iPerf is installed on at least two hosts in your network. If you only have one, you might try testing against a public server. For Tomato, install Entware first then run opkg install iperf.

  2. Ensure the neccessary firewall ports are open (default is 5001).

  3. Test iPerf manually to check connectivity.

  4. Ensure the machine which is your iPerf client:

    • has SSH is running, and that PRTG probe can connect to it
    • is set up in PRTG as a device

    Note your PRTG probe does not need connectivity to the computer that will act as the iPerf server. Also if you have several SSH-based PRTG sensors sampling a Tomato router at high frequency, you may need to relax the SSH connection rate throttling (under Administration | Admin Access | Admin Restrictions | Limit Connection Attempts).

Installation

  1. Place iperfsensor.sh on the computer that will act as the client, e.g.:

    mkdir -p /var/prtg/scriptsxml
    cd /var/prtg/scriptsxml
    wget -O iperfsensor.sh http://cdn.rawgit.com/rkagerer/iperfsensor/1.0.4/iperfsensor.sh
    chmod +x iperfsensor.sh
  2. Add an SSH Script Advanced sensor in PRTG, and pick iperfsensor.sh.

  3. Under Parameters, enter the parameters to be passed to iPerf, just as if you were running it from the command line. e.g.:

    -c iperf.scottlinux.com -p 5201
    
  4. Shell Timeout should be longer than twice your iPerf test duration. This is because both an up and down test is performed. By default, each test lasts 10 seconds, but you can change this using the -t parameter.

Bandwidth Disclaimer

Automated iPerf testing can eat up a lot of bandwidth. The best way to use this tool is between two internal nodes of your network (e.g. to monitor a point to point Wifi link). If you use it across a WAN link, be sure you have sufficient bandwidth and budget for the traffic that will be generated!

Also keep in mind that other, parallel traffic loads on your network will affect the results.

Changelog

  • v1.0.4 (2015-Sep-21):
    • Fix one of the URL's in comments
    • Escape special XML characters in error text reported to PRTG
  • v1.0.3 (2015-Sep-20): Clean up
  • v1.0.2 (2015-Sep-20): Improvement to report errors back to PRTG
  • v1.0.1 (2015-Sep-20): Initial release

Bling

Gauges

Grids