Quick Installation Guide

Below is the result of our efforts to be able to walk you through, step by step, the process of installing QuotaMon on a central server and have it monitor your systems. Walk through it sequentially or hit the quick links to skip to the juicy bits. We've tried very hard to not leave anything out, but no one is perfect. If you're having problems, visit our documentation pages to see if your problem has already been addressed. If not, please, .



System Requirements

  • Operating System
  • Linux

  • Perl 5.10 (or greater)
  • and the following non-core modules:

    DateTime
    DBI
    GD::Graph::bars
    GD::Graph::hbars
    GD::Graph::lines
    HTML::TreeBuilder::XPath
    Net::OpenSSH
    Template
    Text::CSV

    Modules are available from http://www.cpan.org

  • MySQL
  • Available at: http://www.mysql.com/

  • QuotaMonGER User
  • A generic user and group that will be used to collect QuotaMon data from remote hosts via the 'rsync' command from the QuotaMonGER server. SSH key exchange must be configured to allow access without password prompting. (The account can have a disabled password.)

    Ex.
    user - quotamonger:x:3334:QuotaMonGER:/usr/local/quotamonger:/bin/bash
    group - quotamonger:x:3334:QuotaMonGER

    NOTE: If you intend to use quotamonger to also monitor the 'server' machine, make sure that the key exchanges are also performed to allow passwordless 'remote' access from that machine to itself.

  • HTTP Server
  • Development was done using Apache 2, but you should be able to use other web servers. A config file is provided if you do use Apache.

  • Web Browser
  • To view the GUI.

Installation

  1. Make sure all of the above prerequisites are installed.
  2. Create the database and requisite tables with the following SQL statements:

  3. DROP DATABASE IF EXISTS quotamon2;

    CREATE DATABASE quotamon2;

    USE quotamon2;

    CREATE TABLE `capacity` (
    `recorded_on` date NOT NULL,
    `total_gigabytes` float unsigned NOT NULL,
    PRIMARY KEY (`recorded_on`),
    UNIQUE KEY `date_time` (`recorded_on`),
    UNIQUE KEY `recorded_on` (`recorded_on`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    CREATE TABLE `partition` (
    `partition` varchar(100) NOT NULL DEFAULT '',
    `host` varchar(20) NOT NULL,
    `date` date NOT NULL,
    `size` double DEFAULT '0',
    `units` char(2) DEFAULT 'MB',
    `used` double DEFAULT '0',
    `percent` int(11) DEFAULT '0',
    `intervals` varchar(80) NOT NULL,
    `accessed` varchar(250) NOT NULL,
    `created` varchar(250) NOT NULL,
    `modified` varchar(250) NOT NULL,
    `free` double DEFAULT '0',
    `type` varchar(10) DEFAULT NULL,
    `mount_ct` int(11) DEFAULT '0',
    `max_mount_ct` int(11) DEFAULT '0',
    `last_check` varchar(24) DEFAULT 'Unknown',
    `check_int` varchar(24) DEFAULT 'Unknown',
    `next_check` varchar(24) DEFAULT 'Unknown',
    `scan_time` int(11) DEFAULT '0',
    PRIMARY KEY (`partition`,`host`,`date`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    CREATE TABLE `user` (
    `user` char(10) NOT NULL,
    `uid` int(11) NOT NULL,
    `date` date NOT NULL,
    `partition` varchar(30) NOT NULL,
    `host` varchar(20) NOT NULL,
    `size` double DEFAULT '0',
    `units` char(2) DEFAULT 'MB',
    `percent` int(11) DEFAULT '0',
    `intervals` varchar(80) NOT NULL,
    `accessed` varchar(250) NOT NULL,
    `created` varchar(250) NOT NULL,
    `modified` varchar(250) NOT NULL,
    PRIMARY KEY (`user`,`uid`,`date`,`partition`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    CREATE FUNCTION `to_gigabytes`(val double, units CHAR(2))
    RETURNS double
    DETERMINISTIC
    RETURN (
    CASE
    WHEN units = 'TB' THEN val * 1024
    WHEN units = 'GB' THEN val
    WHEN units = 'MB' THEN val / 1024
    WHEN units = 'KB' THEN val / (1024 * 1024)
    WHEN units = 'B' THEN val / (1024 * 1024 * 1024)
    END
    );

  4. Unpack the tarball.
  5. Edit Makefile and modify the following variables in the user-configurable variables section to suit your site:

  6. ORGANIZATION
    PREFIX
    DOCROOT
    HTTPD_USER
    HTTPD_GROUP
    DB_HOST
    DB_NAME
    DB_USER
    DB_PASSWORD

  7. As root, type 'make install'.
  8. This will install the scripts, libraries, and config files in ${PREFIX}/quotamonger-0.0.1 and create a symbolic link to that directory in ${PREFIX}/quotamonger

  9. Create a crontab entry.
  10. Ex.
    0 8 * * 4 /usr/local/quotamonger/bin/quotamonger > /dev/null 2>&1

Configuration

  1. Rename the config file template to hosts.cfg.
  2. Ex. % cd /usr/local/quotamonger/cfg && cp hosts.cfg-tmpl hosts.cfg

  3. Add a line to hosts.cfg for each host you wish to pull QuotaMon data from.
  4. Ex.
    host1
    host2

  5. Configure Apache
  6. You only need to do this step once, the first time you install QuotaMonGER.

    Ex.
    % cp /usr/local/quotamonger/cfg/quotamonger-httpd.conf /etc/httpd/conf.d/
    % service httpd configtest
    % service httpd reload

  7. Run quotamonger
  8. Ex. % /usr/local/quotamonger/bin/quotamonger

    If there are no QuotaMon data files for today's date on the hosts listed in hosts.cfg, QuotaMonGER will error out. You can use the -w or --wayback option to pull all data files from the remote hosts, regardless of the datestamp on the files.

That should be it. Congrats! You now have QuotaMonGER installed. For questions and support, see our documenation page where you can get all kinds of useless helpful information, or .