Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 76 lines (54 sloc) 2.322 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
-----------------------------------------------------------
mrtgsql - a MRTG to SQL logging and reporting tool for MRTG
by Max Clark <max@clarksys.com>
-----------------------------------------------------------

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.
Something went wrong with that request. Please try again.