Home > mrtgsql

mrtgsql

Mrtgsql is a project mainly written in Perl, based on the GPL-2.0 license.

mrtgsql - a MRTG to SQL logging and reporting tool for MRTG

-----------------------------------------------------------
mrtgsql - a MRTG to SQL logging and reporting tool for MRTG
by Max Clark <[email protected]>
-----------------------------------------------------------

mrtgsql is composed of two programs: mrtgsql which inserts data from the MRTG .log files into a database, and mrtgreport which reports usage on the interfaces in total GB and the 95th percentile.

Get it from:

https://github.com/CreativeThought/mrtgsql
==========================================

Required Modules

  • DBI and DBD::Pg or DBD::MySQL -> get it from CPAN

Note that several Linux distributions will already have these modules as RPMs.

Usage

mrtgsql is made of two scripts:

  • mrtgsql

    This script parses the MRTG .log files and updates the database with the values.

    usage: mrtgreport [options] -h, --help display this help and exit --version output version information and exit -v, --verbose be verbose -d, --directory directory where the mrtg .log files exist --dbname database name to connect to --dbuser database user name --dbpass database password

    If -d is not specified, it defaults to /usr/local/mrtg. Directory, dbname, dbuser, and dbpass are configurable within the script.

  • mrtgreport

    This script reports data from the database in Total GB and the 95th percentile.

    usage: mrtgreport [options] -h, --help display this help and exit --version output version information and exit -v, --verbose display debug messages -l, --lastmonth report for the previous month -y, --year select the year in YYYY format, defaults to the current year -m, --month select the month in MM format, defaults to the current month --dbname database name to connect to --dbuser database user name --dbpass database password

    If a date is not specified the script defaults to the current month. For reporting purposes you should run this script with -l for the previous month.

License

mrtgsql is released under the GPL license. See the file COPYING included in the distribution for details.

Previous:acdev-bot