BoxMon

misc/BoxMon.png

About

BoxMon is a system monitoring tool. Data collecting is done through simple python scripts that are used as plugins in boxMon, in a cron job. With gathered data, it's possible to build some graphs, showing the evolution of the system by day, week, month or year.

With this tool you can monitor as many host as you want and store the data in a single database.

  • mysql server (somewhere on the network)
  • mysql client (on the target host)
  • python (>=2.1 but not checked)
  • python-mysql
Also if you want to graph something (we hope so :) :
  • gnuplot
  • apache (with CGI enabled)

Here is a common setup for boxMon :

misc/boxmonArch.png

Screenshots

GNUPlot is used to make graphs, generated through the boxMon CGI script.

Network load:

screenshots/netload.png

System load:

screenshots/systemload.png

Download

Latest release is 0.0.3

Developpement code is accessible from the PythonFR SVN repository or with any SVN client like this :

$ svn co http://svn.pythonfr.org/public/pythonfr/boxMon

Installation

All you need here is distutils, which is packaged with recent pythons. If you're using debian, install python2.1-dev (or your preferred version)

$ python setup.py build

as root:

# python setup.py install

Once the package is installed, do the following:

  1. create the database on the SQL server

    mysql -u root -p < boxMon.sql
    
  2. copy boxMonrc.sample to /etc/boxMonrc and change it to for your needs (mainly PluginPath and SQL parameters) You can also configure the /etc/boxMonrc with:

    boxMon --configure
    
  3. add this to root crontab:

    0-59/5 * * * *  /usr/bin/python /usr/bin/boxMon > /dev/null
    

    root account is needed by some plugins but this may change

  4. install the CGI script:

    ln -s /usr/lib/python2.3/site-packages/boxMon/boxMon.cgi /usr/lib/cgi-bin/boxMon.cgi
    

Check out the Makefile to do this automatically without risk !!

Warning

For now you have to give apache user (www-data on Debian) read permission to /etc/boxMonrc.

Miscellaneous

On the misc directory you'll find some PHP pages you can use to see all your graphs in one shot. There's also the project's logo, courtesy of xtd at altern NOSPAM dot org.

Note on ApacheHits plugin

You'll need to tweak your apache config :

#--- <httpd.conf> ------

LoadModule status_module /usr/lib/apache/1.3/mod_status.so

<Location /server-status>
  SetHandler server-status
  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1
</Location>

# don't want to count these hits !
SetEnvIfNoCase Request_URI "^/server-status?" nolog
CustomLog /var/log/apache/access.log combined env=!nolog

#---- </httpd.conf> -----

Note on Iptables plugin

This one is not very smart because it requires some modifications in your firewall. That's why it's advised to use NetStats plugin instead.

Contact

BoxMon is developped by 3 Finix people:

Mail : firstname dot lastname at finix dot eu dot org