https://github.com/davesteele/mrtg-probes
MRTG Probe Scripts
https://github.com/davesteele/mrtg-probes
Last synced: 7 months ago
JSON representation
MRTG Probe Scripts
- Host: GitHub
- URL: https://github.com/davesteele/mrtg-probes
- Owner: davesteele
- License: gpl-2.0
- Created: 2015-09-21T01:01:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-23T22:11:32.000Z (over 10 years ago)
- Last Synced: 2025-01-13T13:29:34.653Z (about 1 year ago)
- Language: Python
- Size: 168 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MRTG Probes
This repository contains [MRTG](https://oss.oetiker.ch/mrtg/doc/mrtg.en.html) data
collection scripts for plotting different metrics.
### download_performance.py

Plot '1 hour' and '24 hour' download performance numbers from a specific site,
specified by URL. It uses a file lock to prevent parallel download tests.
$ download_performance.py -h
usage: download_performance.py [-h] [-w ] [-b] [-x]
MRTG script for logging download performance
positional arguments:
URL of the test file
optional arguments:
-h, --help show this help message and exit
-w , --workingdir
working directory (with write permissions for the mrtg
poller script). Defaults to "/var/www/html/mrtg"
-b, --bps Return bits-per-second, instead of bytes-per-second
-x, --execute (internal use only) perform the backup test
Called repeatedly, this script will download a url once per hour, and will
report the latest download speed and the slowest in the last 24 hours.
Example MRTG configuration file, for monitoring download performance from 'otto':
EnableIPv6: no
WorkDir: /var/www/html/mrtg
Title[otto_bw]: otto bandwidth monitoring
Target[otto_bw]: `/usr/local/bin/download_performance.py -b -w /var/www/html/mrtg http://otto/testfile`
Directory[otto_bw]: ottobw
MaxBytes[otto_bw]: 30000000
PageTop[otto_bw]:
otto download performance
YLegend[otto_bw]: Speed
ShortLegend[otto_bw]: bps
LegendO[otto_bw]: 24 Hr min
LegendI[otto_bw]: 1 Hr performance
Options[otto_bw]: growright, noinfo, gauge