Installing a BigSister Agent on a Cobalt RAQ4 server

Print Friendly, PDF & Email

Installing a BigSister Agent on a RAQ4 server…’, ‘Actually, the process is pretty simple, but because BigSister requires the latest version of Perl, and I am not the type to upgrade the perl on the entire system just for a BigSister agent, here is how to do it for just the BigSister agent and the admin account. If you have multiple servers, this will allow you to copy the compiled binaries to all of your servers in their admin accounts and just configure. So, I\’d suggest you do this on a development box, as it can be processor intensive at times.

Installing the latest Perl

First, head over to perl.com and download the latest stable.tar.gz file from their site. Either upload it into your admin account, or wget it.

We are going to install it into a bigsisperl directory in admin\’s home.

$mkdir bigsisperl

$ tar -xvzf stable.tar.gz

This will extract all the files into a perl-x.x.x directory.

$cd perl-x.x.x

$./Configure -Dprefix=/home/sites/home/users/admin/bigsisperl

Just hit ENTER for the 1,000 questions it asks, all the defaults are fine.. except when it says that ~/bin doesn\’t exist, use it anyway? [n], say Y and the same for any other directories that don\’t exist..

When it is done with that, it will do a make dep, and then tell you to do \’make\’.. so do that:

$ make

This one will take a while..

When it is done, you can do:

$ make test
but you don\’t have to.. Then, do:

$make install

When it is done, you will be all set.. Next, on to installing the agent.

Installing BigSister Agent

su to root

$su
password:

#rpm -i bigsister-1.02-4.noarch.rpm

You\’ll get some messages stating it is using root..

#rpm -i bigsister-agent-1.02-4.noarch.rpm

Now, we need to reconfigure it to work with our new perl.

#vi /etc/init.d/bigsister

Add this towards the top.. I put it right after the “bs_instdir=/usr/share/bigsister” statement.

export PATH=/home/sites/home/users/admin/bigsisperl/bin:${PATH}

Then, change the following:
FROM:
exec $bs_instdir/bin/bb_start “$@”

TO:
exec perl $bs_instdir/bin/bb_start “$@”

Then, we just need to tell the start script which perl to use.

#vi /usr/share/bigsister/bin/bb_start

At the top, change it to:

#!/home/sites/home/users/admin/bigsisperl/bin/perl

Now, do the same for:
#vi /usr/share/bigsister/uxmon/uxmon

If you have troubles with any of the modules not working properly, you can also fix the path for them.. to see a list, I just did this:

#cd /usr/share/bigsister
#grep -r perl *

Then look at all the files listed with:

#!/usr/bin/perl

and edit them to the path above.

Now, to configure the agent.

#vi /etc/bigsister/uxmon-net

Edit the bsdisplay to point to your BigSister server, and I added the following, but you will need to change this to match your server configuration (depending on which services you run)

localhost load memory network cpuload
localhost disk
localhost syslog
localhost proc=sshd procs
localhost users
localhost http
localhost ssh
localhost smtp
localhost pop3

Let\’s give the agent read access to the logs

# chmod +r /var/logs/messages
# chmod +r /var/logs/maillog

Now, let\’s start it up.

# /etc/init.d/bigsister start

It should say:

Starting Big Sister ...
Agent uxmon                                       OK

Now, to make it start if the server is rebooted, do:

# ln -s /etc/init.d/bigsister /etc/rc.d/rc3.d/S88bigsisagent

Ok, so you have it working and need to install in on a bunch of servers (that are all the same as your original/dev server).. here\’s what you do:

Multiple Servers

So, first, we tar up the perl we just compiled.

$ cd

$ tar -cf bigsisperl.tar bigsisperl/*

$ gzip bigsisperl.tar

$ sftp admin@nextserver.com

sftp>put bigsisperl.tar.gz
sftp>put bigsister-1.02-4.noarch.rpm
sftp>put bigsister-agent-1.02-4.noarch.rpm
sftp>exit

Now, either ssh strait into that server, or do:

$ ssh admin@nextserver.com

$ tar -xvzf bigsisperl.tar.gz

And that\’s it.. Now, perl is already “installed” for the admin user, just follow the directions above for installing the client again..

Rinse and repeat for each server.

Misc

Ok.. the list above works without mods.. but I would also like it to monitor mysql. The easy way is to just monitor the process by doing this:

localhost proc=mysqld procs proc=sshd procs

but, that doesn\’t show up as a specific process on our screen.. so, if you want it to work, you have to create a test user in mysql on that machine. In my example, I am not going to set a password, so it just makes life easier.

So, lets start with installing the MySQL Perl module in our new perl installation, along with the 20+ other modules that need to be installed.. 🙂

$ cd ~/bigsisperl/bin
$ lynx http://www.google.com
say yes, q to quit and continue on…
$ ./perl -MCPAN -e shell;
Say no

Let\’s update the version of CPAN.

cpan> install Bundle::CPAN

Pick 2, to install 20 modules and continue on..

Whenever it gets stuck trying to use lynx for something, just hit cntl-c and it will use ncftpget instead.

cpan> reload cpan

cpan> install Class::DBI::mysql
and say yes, so it can chase after whatever it needs.

Another wierd one.. is it will fail towards the end.. just do the reload cpan again, exit out, and go back in.. then do:

cpan>install Bundle::DBD::mysql

and let it run again.

If you have issues with the test, make sure that you have the following:

Host: %
DB: test
User: blank
Select_priv: Y

Add the following to your uxmon-net file:

localhost mysql

And then, just to make sure it\’s reading the new config.. do:

# /etc/init.d/bigsister restart

Deleteing Dead hosts from BigSister server:

In order to remove a whole host with all its checks, follow this procedure

remove all the tests in the uxmon-net files of the agents that were responsible for performing the tests

wait until the agents re-read their configuration (up to one minute) or re-start the agent

remove all group associations for the host in bb-display.cfg on the server side

wait until the server re-read its configuration or re-start the server

execute

bsadmin -d localhost leave host *
on the Big Sister server side

after up to one minute the machine will disappear

Leave a Reply