How to install a monitoring system: PandoraFMS 2.0 in Ubuntu 8.04

Sponsored Link

This guide is made using code from sources (valid also using tarball with latest code, like 2.0). It was made using Ubuntu 8.04 server.

Official PandoraFMS website is: http://pandorafms.org

Install your subversion client:

sudo apt-get install subversion

Checkout Pandora FMS repository

cd $HOME
svn co https://pandora.svn.sourceforge.net/svnroot/pandora/trunk
.
.
[MANY FILES]
.
.
A trunk/pandora_server/util/pandora_dbstress.README
A trunk/pandora_server/util/PandoraFMS
A trunk/pandora_server/util/pandora_DBI_test.pl
A trunk/pandora_server/util/pandora_snmp.README
Checked out revision 1021.
Now your "SOURCES" directory are under $HOME/trunk
root@gdrone:~# cd trunk/
root@gdrone:~/trunk# cd pandora_server/
root@gdrone:~/trunk/pandora_server# ls
AUTHORS ChangeLog COPYING Makefile.PL pandora_recon pandora_snmpconsole util
bin conf lib pandora_network pandora_server specs
root@gdrone:~/trunk/pandora_server# perl Makefile.PL
Warning: prerequisite DBI 0 not found.
Warning: prerequisite SNMP 0 not found.
Warning: prerequisite XML::Simple 0 not found.
Writing Makefile for PandoraFMS

Resolve dependencies installing missing packages, if your Debian/Ubuntu system needs more packages, install using a similar command. Please refer documentation about prerequisites to know what packages you need).

sudo apt-get install libdate-manip-perl snmp snmpd libsnmp-perl libtime-format-perl \
libxml-simple-perl libnetaddr-ip-perl libdbi-perl libxml-simple-perl libnetaddr-ip-perl \
libsnmp-perl libhtml-parser-perl wmi-client xprobe2

If you have not installed developer tools, install with metapackage:

sudo apt-get install build-essential

Run make

# make
cp lib/PandoraFMS/Tools.pm blib/lib/PandoraFMS/Tools.pm
cp lib/PandoraFMS/Config.pm blib/lib/PandoraFMS/Config.pm
cp lib/PandoraFMS/DB.pm blib/lib/PandoraFMS/DB.pm
cp bin/pandora_server.pl blib/script/pandora_server.pl
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pandora_server.pl
cp bin/pandora_network.pl blib/script/pandora_network.pl
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pandora_network.pl
cp bin/pandora_snmpconsole.pl blib/script/pandora_snmpconsole.pl
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pandora_snmpconsole.pl
cp bin/pandora_recon.pl blib/script/pandora_recon.pl
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pandora_recon.pl

# make install
Installing /usr/local/share/perl/5.8.7/PandoraFMS/Tools.pm
Installing /usr/local/share/perl/5.8.7/PandoraFMS/Config.pm
Installing /usr/local/share/perl/5.8.7/PandoraFMS/DB.pm
Writing /usr/local/lib/perl/5.8.7/auto/PandoraFMS/.packlist
Appending installation info to /usr/local/lib/perl/5.8.7/perllocal.pod

Test Pandora FMS data server

# pandora_server --help

Pandora FMS Data Server 2.0 Build Copyright (c) 2004-2008 ArticaST
This program is Free Software, licensed under the terms of GPL License v2.
You can download latest versions and documentation at http://pandora.sourceforge.net.

I Need at least one parameter: Complete path to Pandora FMS Config file

Syntax:
pandora_server <fullpathname to pandora config file> [ options ]

Following options are optional :
-v  : Verbose mode activated, give more information in logfile
-d  : Debug mode activated, give extensive information in logfile
-D  : Daemon mode (runs in backgroup)
-h  : This screen, show a little help screen

Configure Pandora FMS from sources

Create directories:

sudo mkdir /var/spool/pandora

sudo mkdir /var/spool/pandora/data_in

Create user pandora

sudo useradd pandora

Create homedir for user pandora and .ssh subdir

sudo mkdir /home/pandora

sudo mkdir /home/pandora/.ssh

sudo chown -R pandora /home/pandora

Create Logfile directory

sudo mkdir /var/log/pandora

Make Pandora incoming dir writable for user "pandora"

sudo chown pandora:root /var/spool/pandora/data_in

sudo chmod 770 /var/spool/pandora/data_in

(OPTIONAL) Use scponly to secure pandora user

Install scponly

sudo apt-get install scponly

Replace pandora user shell for scponly

sudo usermod -s /usr/bin/scponly pandora

Create /etc/pandora

sudo mkdir /etc/pandora

Copy default config to /etc/pandora directory

sudo cp $HOME/trunk/pandora_server/conf/pandora_server.conf /etc/pandora/

sudo chmod 770 /etc/pandora/pandora_server.conf

Edit /etc/pandora/pandora_server.conf file

Copy startup daemons to /etc/init.d

sudo cp $HOME/trunk/pandora_server/pandora_* /etc/init.d/

(OPTIONAL) Create links to appropiate runlevel to be sure that Pandora FMS starts when system bootup

ln -s /etc/init.d/pandora_server /etc/rc2.d/S90pandora_server
ln -s /etc/init.d/pandora_recon /etc/rc2.d/S90pandora_recon
ln -s /etc/init.d/pandora_network /etc/rc2.d/S90pandora_network
ln -s /etc/init.d/pandora_snmpconsole /etc/rc2.d/S90pandora_snmpconsole
ln -s /etc/init.d/pandora_wmi /etc/rc2.d/S90pandora_wmi
ln -s /etc/init.d/pandora_plugin /etc/rc2.d/S90pandora_plugin
ln -s /etc/init.d/pandora_prediction /etc/rc2.d/S90pandora_prediction

(OPTIONAL) If you're making Pandora FMS server from sources (using PERL makefile), probably you need to link executables placed on /usr/local/bin to /usr/bin because launcher scripts look for Pandora FMS executables at /usr/bin:

ln -s /usr/local/bin/pandora_server /usr/bin/pandora_server
ln -s /usr/local/bin/pandora_snmpconsole /usr/bin/pandora_snmpconsole
ln -s /usr/local/bin/pandora_recon /usr/bin/pandora_recon
ln -s /usr/local/bin/pandora_network /usr/bin/pandora_network
ln -s /usr/local/bin/pandora_wmi /usr/bin/pandora_wmi
ln -s /usr/local/bin/pandora_plugin /usr/bin/pandora_plugin
ln -s /usr/local/bin/pandora_prediction /usr/bin/pandora_prediction

Create shared resources directory for Pandora FMS

sudo mkdir /usr/share/pandora

Copy util directory to /usr/share/pandora

sudo cp -R $HOME/trunk/pandora_server/util /usr/share/pandora

Final disposition of files for production usage

Installed automatically with perl makefile at build process

Main executables

  • /usr/bin/pandora_network -- Pandora FMS Network server
  • /usr/bin/pandora_server -- Pandora FMS Dataserver
  • /usr/bin/pandora_snmptraps -- Pandora FMS SNMP Console for traps
  • /usr/bin/pandora_recon -- Pandora FMS Recon server
  • /usr/bin/pandora_prediction -- Pandora FMS Prediction server
  • /usr/bin/pandora_wmi -- Pandora FMS WMI server
  • /usr/bin/pandora_plugin -- Pandora FMS Plugin server

Pandora FMS Perl (.pm) libraries

(depends on your Linux distro and version) in my setup (Ubuntu 6.06 server):

  • /usr/local/share/perl/5.8.7/PandoraFMS/Config.pm
  • /usr/local/share/perl/5.8.7/PandoraFMS/DB.pm
  • /usr/local/share/perl/5.8.7/PandoraFMS/Tools.pm

Manual install / Package install

Startup scripts

  • /etc/init.d/pandora_network
  • /etc/init.d/pandora_server
  • /etc/init.d/pandora_snmpconsole
  • /etc/init.d/pandora_recon
  • /etc/init.d/pandora_prediction
  • /etc/init.d/pandora_wmi
  • /etc/init.d/pandora_plugin

Configuration files

  • /etc/pandora/pandora_server.conf

Utilities

  • /usr/share/pandora/util

Documentation and examples

  • /usr/share/pandora/doc

Setting up Pandora FMS server

You need to edit /etc/pandora/pandora_server.conf and setup some paths and user/password items. If you dont remember passwords/users, let's take a look to your Pandora FMS console setup at /var/www/pandora_console/include/config.php.

Running Pandora Servers

Once you have set up the pandora_server.conf file, it is time to start the servers:

  • /etc/init.d/pandora_server start
  • /etc/init.d/pandora_network start
  • /etc/init.d/pandora_snmpconsole start
  • /etc/init.d/pandora_recon start
  • /etc/init.d/pandora_prediction start
  • /etc/init.d/pandora_wmi start
  • /etc/init.d/pandora_plugin start

Installing Pandora FMS 2.0 CONSOLE in Ubuntu Server 8.04

Install openssh server

sudo apt-get install ssh

Download console tarball and uncompress on /tmp/pandora/pandora_console

cd /tmp

tar xvzf /whateveritwere/pandora_console_xxxx.tar.gz

Install apache, php, mysql (LAMP) and some PHP5 modules:

apt-get install libapache2-mod-php5 apache2 mysql-server php5-gd php5-mysql php-pear php5-snmp php-db php-gettext graphviz

Install PEAR XML-RPC

pear install xml_rpc

Move pandora_console to /var/www

mv pandora_console/ /var/www

Change owner to www-data (apache2 user)

sudo chown -R www-data /var/www/pandora_console/

Probably you need to restart your apache

sudo /etc/init.d/apache2 stop

sudo /etc/init.d/apache2 start

If you're installing your mysql, set up a root password, for example "none"

mysqladmin password none

Make sure your MySQL is running, if not: sudo /etc/init.d/mysql start

Access with a browser to this machine, in my case, to 192.168.50.126
http://192.168.50.126/pandora_console/install.php

A webpage should show you a welcome screen to install wizard. Read carefully and press "NEXT" to begin installation and go to step 2.

This screen needs to enter data about your database root user (or other with privileges to create databases, table and insert data), and where is placed your Pandora FMS setup.

Enter mysql user and password (if you're following this doc, step by step,it should be root as user, none as password, and localhost as hostname), and let default values in last two boxes. Let's go to final step.

This should be done and Pandora Console fully installed. Last step is delete upgrade.php, install.php, all *.sql files:

rm upgrade.php

rm install.php

rm *.sql

And access to your new Pandora FMS console at
http://localhost/pandora_console/index.php

Login with user "admin" and password "pandora"

Sponsored Link

You may also like...

5 Responses

  1. CafeNinja says:

    Small correction. The URL should be http://pandorafms.org/

    Cheers,
    CafeNinja

  2. admin says:

    I have updated the article

    Thanks

  3. Luis says:

    This article is D best out there.

    Thanks

  4. Troy says:

    Great procedure! I just have one problem. When I do the “Run make” step I get this:
    # make
    make: *** No targets specified and no makefile found. Stop.

    I feel like I am missing something silly here but I had to ask because I am stumped.

    Thanks in advance!

  5. Kilroy says:

    Hey Troy,

    I think that you might have missed some steps in the instruction that are crucial(I missed them first too). If you look at the “Checkout Pandora FMS repository” step, under where it spits all the files out, there are these steps to get the makefile.

    “root@gdrone:~# cd trunk/
    root@gdrone:~/trunk# cd pandora_server/
    root@gdrone:~/trunk/pandora_server# ls
    AUTHORS ChangeLog COPYING Makefile.PL pandora_recon pandora_snmpconsole util
    bin conf lib pandora_network pandora_server specs
    root@gdrone:~/trunk/pandora_server# perl Makefile.PL
    Warning: prerequisite DBI 0 not found.
    Warning: prerequisite SNMP 0 not found.
    Warning: prerequisite XML::Simple 0 not found.
    Writing Makefile for PandoraFMS”

    You need to cd to /home/$user/trunk/pandora_server/ then run perl Makefile.pl. This will give you the makefile.

    Kilroy

Leave a Reply

Your email address will not be published. Required fields are marked *