Installation on an Ubuntu Linux 7.10/8.04

Travis Wu (twu AT capitalsystems DOT com) had written an article called How to install Monitorix in Ubuntu that will make life easier to some people. The following is a copy and adaptation (under permission) of his article:

[Monitorix], It does exactly what I want (monitoring and making coffee) plus the interface is pretty cool by default. However there is no Ubuntu binary package available for download. Here is how I got it working on my Ubuntu server. I have tested this on both Ubuntu 7.10 and 8.04.

Required packages

Install the required packages:
apt-get install rrdtool and librrds-perl procmail
      
Download and extract monitorix package:
wget http://www.monitorix.org/monitorix-1.2.0.tar.gz  && tar -zxvf monitorix-1.2.0.tar.gz
      
Modify the installation path for Ubuntu flavor in install.sh file (line 63 - 69):
From:
SBIN="/usr/local/sbin"
ETC="/usr/local/etc"
INIT="/usr/local/etc/rc.d"
LIB="/usr/local/lib"
DOC="/usr/local/share"
HTDOCS="/usr/local/www/data"
CGIBIN="/usr/local/www/cgi-bin"
      
To:
SBIN="/usr/sbin"
ETC="/etc"
INIT="/etc/init.d"
LIB="/usr/local/lib"
DOC="/usr/local/share"
HTDOCS="/var/www"
CGIBIN="/usr/lib/cgi-bin"
      

Installation

  • run the install and choose option "2 - Generic"; finish it with all default options
    ./install.sh
          
  • create the missing folders:
  • mkdir -p /var/lib/monitorix
          
  • modify the configuration file: line 252 in /etc/monitorix.conf
  • From: our %BASE_WWW = ("Linux-RHFC" => "/var/www/html",
    To: our %BASE_WWW = ("Linux-RHFC" => "/var/www",
Of course then you need to customize the settings

Finalization

Start monitorix:
/etc/init.d/monitorix.sh start
      
One more fix:
mv /etc/cron.d/monitorix.sh /etc/cron.d/monitorix
chmod +x /etc/cron.d/monitorix
      
To verify: do
ls -l /var/lib/monitorix/
      
and you should see all the rrd files get updated every minutes.
Now wait for awhile then goto http://yourIP/monitorix; done.

Installation on an Ubuntu Linux (old)

Gerard (gerardl AT networkpro DOT co DOT nz) had submitted a few notes about how to install Monitorix in an Ubuntu Linux system. Here is his transcript:

Hello

I'm running monitorix 0.9.1 and find it very nice, very clean and looks really good.

Feedback:
On my system (ubuntu edgy server) I had to do the following to make it work: installed rrdtool and librrds-perl from 'feisty' (testing) repository - 1.2.011 wasn't high enough and didn't work with some of the VERSION sections in the cgi file. I needed 1.2.15.

changed the /etc/init.d/monitorix.sh file and replaced the lockfile command with
if [ ! -e $LOCK ]; then
touch $LOCK

I don't have procmail (or whatever package includes the function) installed so lockfile function didn't work.

changed the /etc/cron.d/monitorix.sh file to /etc/cron.d/monitorix. I also removed the #!/bin/sh line. Until I did these, cron wouldn't run the included commands so graphs only updated when I ran the monitorix.pl update, collect and report commands manually.

changed the /usr/lib/cgi-bin/monitorix/localhost.cgi to produce the correct cron.d file as per my change above.

and of course I had to modify the /etc/monitorix.conf for the correct directories, network settings etc.

hope this helps and you can add these checks/changes to your updates/documentation

regards
Gerard