BigBrother: RRDTool and LARRD (Data Trending)

Posted: December 19, 2011 in Linux Related

How to Setup RRDTool and Larrd on your BigBrother using CentOS


Notes: must have the following installed 
pod2man cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel

[root@centos6 ~]# cd /usr/local/
[root@centos6 local]# wget
[root@centos6 local]# tar -zxvf rrdtool-1.4.5.tar.gz
[root@centos6 local]# rm -f rrdtool-1.4.5.tar.gz
[root@centos6 local]# cd rrdtool-1.4.5
[root@centos6 rrdtool-1.4.5]# export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
[root@centos6 rrdtool-1.4.5]# ./configure
[root@centos6 rrdtool-1.4.5]# make
[root@centos6 rrdtool-1.4.5]# make install
[root@centos6 rrdtool-1.4.5]# make site-perl-install
[root@centos6 rrdtool-1.4.5]# cd /usr/local/
[root@centos6 local]# ln -s rrdtool-1.4.5 rrdtool
[root@centos6 local]# wget
[root@centos6 local]# tar -zxvf larrd-0.43e.tar.gz
[root@centos6 local]# rm -f larrd-0.43e.tar.gz
[root@centos6 local]# ln -s larrd-0.43e larrd
[root@centos6 local]# ln -s /home/bbuser/bb19c bb
[root@centos6 local]# ln -s /home/bbuser/bbvar bbvar
[root@centos6 local]# chown -R bbuser:apache larrd-0.43e
[root@centos6 local]# cd larrd
[root@centos6 larrd]# perl install -R –bbhome /home/bbuser/bb –larrdhome /usr/local/larrd –bbcgi /var/www/cgi-bin
[root@centos6 larrd]# cd cgi
[root@centos6 cgi]# mv -f larrd-graphs.cgi /var/www/cgi-bin/
[root@centos6 cgi]# mv -f larrd-grapher.cgi /var/www/cgi-bin/
[root@centos6 cgi]# ln -s /var/www/cgi-bin/larrd-grapher.cgi larrd-grapher.cgi
[root@centos6 cgi]# ln -s /var/www/cgi-bin/larrd-graphs.cgi larrd-graphs.cgi
[root@centos6 cgi]# vi /var/www/cgi-bin/larrd-graphs.cgi

Here are the list of changes you have to made:

line: 1

open(BBDEF,"<$ENV{'BBHOME'}/etc/") or file_error("$ENV{'BBHOME'}/etc/","$!");

change to
open(BBDEF,"<$ENV{'BBHOME'}/etc/") or file_error("$ENV{'BBHOME'}/etc/","$!");

line: 83
open(BBINC,"grep \"^BBSKIN=\" $ENV{'BBHOME'}/etc/ |") or file_error("$ENV{'BBHOME'}/etc/","$!");

change to
open(BBINC,"grep \"^BBSKIN=\" $ENV{'BBHOME'}/etc/ |") or file_error("$ENV{'BBHOME'}/etc/","$!");

[root@centos6 cgi]# vi /var/www/cgi-bin/larrd-grapher.cgi

Here are the list of changes you have to made:
line: 1

line: 89
$date =~ s/:/\\:/g;

change to:
$date =~ s/:/-/g; (for newer versions of rrd)

To Fix the error: “ERROR: Expected some arguments after ‘COMMENT:’”

line 338, 388, 439, 489, and 540


change to

[root@centos6 cgi]# cd /usr/local/larrd
[root@centos6 larrd]# vi

Here are the list of changes you have to made:
on line: 55


on line: 64

change to

line: 69

change to

-- Optional --

Line 77

line: 90 and 92
# Messages that will not prevent larrd from functioning properly 

$ENV{'WARN'} = 0;
# Messages that tell you a little about what larrd is doing (very 

$ENV{'DEBUG'} = 0;

Check /usr/local/larrd/tmp permission:
drwxrwxrwx 2 bbuser apache 4096 Feb 6 2008 tmp

[root@centos6 larrd]# mkdir /home/bbuser/bbvar/rrd
[root@centos6 larrd]# chown -R bbuser:apache /home/bbuser/bbvar/
[root@centos6 larrd]# ln -s /usr/local/larrd /home/bbuser/bb19c/ext/larrd
[root@centos6 larrd]# mv
[root@centos6 larrd]# mv
[root@centos6 larrd]# cp
[root@centos6 larrd]# cp
[root@centos6 larrd]# chown bbuser:apache
[root@centos6 larrd]# chown bbuser:apache

[root@centos6 larrd]# vi

Here are the list of changes you have to made:
Line: 1

line: 18
Uncomment it leave till line 20

line: 59
'your-domain.dom' => {    changed to: 'centos6' => { 

[root@centos6 larrd]# vi /etc/httpd/conf/httpd.conf

line: 228 - Uncomment the entry
ExtendedStatus On

line: 921 to 926 uncomment everything

    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from (changed to your allowed network to access this as it may be security rick if you allowed all.

Switch User bbuser

[bbuser@centos6 ~]$ vi /home/bbuser/bb19c/etc/bb-bbexttab

Add this line at the bottom:
localhost :  : larrd/
localhost :  : larrd/
localhost :  : larrd/
localhost :  : larrd/
  1. Mario Tan says:

    Hi.. saw your 1st graph – “cpu load average” and noticed the “date, time” overlapping on the last line.. I too had the same issue.. any suggestion.. installed version: bb5.1, rrdtool1.48, larrd-043e on RHEL 6.4. X64.

  2. Andrei says:

    You’ve made my day. I owe you beer.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s