Virtual server monitor:Installation/Debian and Ubuntu

From Revolution Linux OpenSource projects

Jump to: navigation, search

Contents

Compatibility

These packages were compiled for Ubuntu 6.06 (dapper), and should work for 6.10 (edgy) also. These packages will not work for Ubuntu 7.07 (feisty) or more recent because they rely on Python 2.5 and the packages were compiled for Python 2.4.

These packages should also work on Debian stable, and probably testing, but were not tested on these platforms.

Introduction

First, you need to add the following source in /etc/apt/source.list :

deb http://downloads.revolutionlinux.com/OpenRevolution/Debian testing main

Then run :

apt-get update

Backend

The backend should be installed on hosts only. It will not work inside a vserver guests.

1- Install with apt-get :

apt-get install vsmon-backend

2- Edit /etc/vsmon/settings.py and change ALLOWED_IP_LIST to allow only the hosts/vservers that should connect to the backend.

3- Restart the backend :

/etc/init.d/vsmon-backend restart

Frontend

The frontend should be installed in it's own vserver guest (even though it should/could work on an host).

1- Install the frontend :

apt-get install vsmon-frontend

2- You can use any webserver or database supported by Django. In this documentation, we will use Apache 2 with mod_python and MySQL :

apt-get install apache2-mpm-prefork libapache2-mod-python mysql-server python-mysqldb
mysql_secure_installation

3- Create a database.

mysql -p
(enter password)
mysql> CREATE DATABASE vsmon;
mysql> exit

4- Edit /usr/lib/python2.4/site-packages/vsmon/frontend/settings.py

DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'vsmon'   
DATABASE_USER = 'root'    
DATABASE_PASSWORD = 'password'
DATABASE_HOST = ''
DATABASE_PORT = ''
Note 
use DATABASE_ENGINE = 'mysql_old' if installing on a Ubuntu 6.06LTS

5- Initialise the database :

cd /usr/lib/python2.4/site-packages/vsmon/frontend
python manage.py syncdb

6- Create an admin user as requested.

7- Restart apache :

/etc/init.d/apache2 restart

8- vsmon should be available at http://hostname/ (where hostname is the name of the vserver vsmon was installed in).

9- Click on Manage host list to add the hosts the backend is installed on.

Nagios plugin

This plugin is to be installed on the same host / vserver than Nagios.

apt-get install vsmon-nagios-plugin

See Virtual server monitor:Nagios plugin for more details about this plugin.

Personal tools