Running bb-sar LARRD on hobbbit server

Alon Ofek AlonO at BEZEQINT.CO.IL
Thu Nov 24 14:05:08 CET 2005


Hello all,

I have seen a few items regarding installing SAR LARRD on Hobbit.

Follow the instructions bellow and that should work (worked for me):

 

1.	Change the hobbitlaunch.cfg and add the larrd.pl to handle LARRD
specific scripts: 

[rrdstatus]

        ENVFILE /usr/local/Hobbit/server/etc/hobbitserver.cfg

        NEEDS hobbitd

        CMD hobbitd_channel --channel=status
--log=$BBSERVERLOGS/rrd-status.log hobbitd_rrd --rrddir=$BBVAR/rrd
--extra-scrip

t=/usr/local/larrd/larrd.pl --extra-tests=sar

2.	restart your hobbitd 
3.	change the larrd.pl to get the input file from the command line
for each server running the test

use lib qw{/usr/local/larrd}; # LARRDHOME hardcoded

require "larrd-config.pl";

 

##################################

# Start of script

##################################

 

my $commahost = shift;

my $testName = shift ; # run the specific test. 

my $log = shift ;      # The log file from Hobbit_rrd

my $mod = $testName ;

 

if( not $ENV{'BBHOME'} ) {

        print "$0: BBHOME is not set\n";

        exit(1);

}

 

if( not -d $ENV{'BBHOME'} ) {

        print "$0: BBHOME is invalid\n";

        exit(1);

}

 

##

# Generate the html

##

 

`$ENV{'LARRDHOME'}/larrd-html.pl >> $ENV{'LARRDLOG'} 2>&1`;

 

 

##

# real work begins here

##

 

if( not -d $ENV{'BBRRDS'} ) {

        mkdir "$ENV{'BBRRDS'}",0755;

        print "$0 did not find $ENV{'BBRRDS'}, created.\n";

}

 

foreach $type ("pl","sh") {

   if( -f "$ENV{'LARRDHOME'}/$mod-larrd.$type") {

        `$ENV{'LARRDHOME'}/$mod-larrd.$type  $commahost $log >>
$ENV{'LARRDLOG'} 2>&1`; 

   }

}

 

##############################################

# end of script

     ##############################################

 

4.	Specific for sar-larrd.pl you must change the script to process
specific log file and update the RRD files. You must change the RRD
location to meet the new Hobbit standard:

# Where should the RRD's be kept?

# pronounced birds

$ENV{'BBRRDS'}="$ENV{'BBVAR'}/rrd/$commahost"; ( Don't forget to change
the RRD time step that is based on the old LOG location:

     #my $ctime = (stat("$ENV{'BBLOGS'}/${commahost}.sar"))[10];  # Old
what to do it

      my $ctime = (stat("$log"))[10];

 

5.	Change the larrd-config.pl for environment variable
6.	Change the sar-grapher.cgi and replace @rrds array with:

@rrds = sort(&glob("$ENV{'BBRRDS'}/$commahost/$commahost.SAR_n_*.rrd"));

 

 

If you need add DEBUG=1 to your larrd-config.pl file the test the
LARRDOUT file for errors.

 

It works great for me but you must think of the performance penalty when
you add more LARRD graphs. 

If anyone find a way to integrate it into the Hobbit_rrd  - I'll be
happy to hear. Perl is much easier then C to do the sar output
processing

 

 

Alon Ofek


-------------------------------------------------------------------------------
The information contained in this message is proprietary of Bezeq International,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of 
this communication is strictly prohibited and may be unlawful. 
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.
-------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20051124/5d3f8a23/attachment.html>


More information about the Xymon mailing list