Rrdtool: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
Boiarino (talk | contribs)
No edit summary
Boiarino (talk | contribs)
No edit summary
Line 28: Line 28:
   use lib '/www/rrdtool1.2.25/lib/perl/5.8.5';  
   use lib '/www/rrdtool1.2.25/lib/perl/5.8.5';  
  BEGIN { @config_files = qw(/www/mrtg2.15.2/etc/mrtg.cfg); }
  BEGIN { @config_files = qw(/www/mrtg2.15.2/etc/mrtg.cfg); }
Also, option '--lazy' was removed to enforcr every minute update.
Also old *.png were removed, they were owned by 'mrtg', new *.png will be written by 'apache'. To see graphes type http://clonmon.jlab.org/cgi-bin/mrtg-rrd.cgi.
Also old *.png were removed, they were owned by 'mrtg', new *.png will be written by 'apache'. To see graphes type http://clonmon.jlab.org/cgi-bin/mrtg-rrd.cgi.

Revision as of 00:35, 19 November 2007

Installation on clonweb to /www as root:

mkdir /www/rrdtool1.2.23
chown mrtg:mrtg /www/rrdtool1.2.23
cp /usr/local/downloads/rrdtool-1.2.23.tar.gz /usr/local/src
cd /usr/local/src
gunzip rrdtool-1.2.23.tar.gz
tar xvf rrdtool-1.2.23.tar
cd rrdtool-1.2.23
./configure  --prefix=/www/rrdtool1.2.23
make
make install

Add following lines to mrtg.cfg to help MRTG to find rrdtool:

 LogFormat: rrdtool
 PathAdd: /www/rrdtool1.2.23/bin
 LibAdd: /www/rrdtool1.2.23/lib/perl/5.8.5

NOTE: I did not do it but if you want to install to /usr/local does not create anything in /www and configure as following:

./configure  --prefix=/usr/local

To see rrd file's contents use 'rrdtool', for example:

/www/rrdtool1.2.25/bin/rrdtool fetch /www/mrtg2.15.2/share/logs/server-cpu.rrd  AVERAGE

IMPORTANT: after switching to rrdtool, mrtg will NOT update web graphs any more; to do that CGI scripts must be used. Some examples of those scripts can be found at [1] and [2]. I installed mrtg-rrd-0.7. Script was installed into Apache's cgi-bin directory and slightly modified by setting actual mrtg location including RRDs.pm:

 use lib '/www/rrdtool1.2.25/lib/perl/5.8.5'; 
BEGIN { @config_files = qw(/www/mrtg2.15.2/etc/mrtg.cfg); }

Also, option '--lazy' was removed to enforcr every minute update. Also old *.png were removed, they were owned by 'mrtg', new *.png will be written by 'apache'. To see graphes type http://clonmon.jlab.org/cgi-bin/mrtg-rrd.cgi.