how to install icinga on ubuntu 10.04 (lucid) with web api idoutils, nconf

3
Monitoring Icinga How to install Icinga on ubuntu 10.04 (lucid) with Icinga-Web, Icinga-API, IDOUtils, NConf. You should note that these are the steps I have taken to get icinga working with icinga-web, nconf, and idoutils. There may be redundancy (for example you can view both the icinga classic and web interfaces), or unnecessary steps. If you notice anything wrong, please let me know and I will update the post accordingly. Install dependencies: sudo apt-get install apache2 build-essential mailutils libgd2-xpm-dev libjpeg62 libjpeg62-dev libpng12-0 libpng12-0-dev mysql-server mysql-client libdbi0 libdbi0-dev libdbd-mysql libdbi-perl libdbd-mysql-perl php5- mysql libapache2-mod-php5 libnet-snmp-perl libradius1 libtalloc2 libwbclient0 radiusclient1 samba-common samba-common-bin smbclient snmp git-core libssl-dev openssl Create icinga user: sudo useradd -m icinga sudo passwd icinga Create icinga-cmd group: sudo groupadd icinga-cmd sudo usermod -a -G icinga-cmd icinga sudo usermod -a -G icinga-cmd www-data Download Icinga: cd /usr/src git clone git://git.icinga.org/icinga-core.git Configure, compile, install Icinga: cd icinga-core sudo ./configure --enable-idoutils --with-command-group=icinga-cmd sudo make all sudo make fullinstall Install sample configuration files: sudo make install-config Copy sample IDOUtils config files to the installation: cd /usr/local/icinga/etc sudo cp idomod.cfg-sample idomod.cfg sudo cp ido2db.cfg-sample ido2db.cfg Enable idomod event broker: sudo nano /usr/local/icinga/etc/icinga.cfg Uncomment the line beginning with broker_module (under the line # Uncomment this to enable idomod.o) Create IDOUtils Database: sudo mysql -u root –p mysql> CREATE DATABASE icinga; mysql> GRANT USAGE ON *.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;

Upload: rolands-kapocus

Post on 22-Feb-2015

539 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: How to Install Icinga on Ubuntu 10.04 (Lucid) With web api IDOUtils, NConf

Monitoring

Icinga

How to install Icinga on ubuntu 10.04 (lucid) with Icinga-Web, Icinga-API, IDOUtils, NConf.

You should note that these are the steps I have taken to get icinga working with icinga-web, nconf, and idoutils.

There may be redundancy (for example you can view both the icinga classic and web interfaces), or

unnecessary steps. If you notice anything wrong, please let me know and I will update the post accordingly.

Install dependencies:

sudo apt-get install apache2 build-essential mailutils libgd2-xpm-dev libjpeg62 libjpeg62-dev libpng12-0

libpng12-0-dev mysql-server mysql-client libdbi0 libdbi0-dev libdbd-mysql libdbi-perl libdbd-mysql-perl php5-

mysql libapache2-mod-php5 libnet-snmp-perl libradius1 libtalloc2 libwbclient0 radiusclient1 samba-common

samba-common-bin smbclient snmp git-core libssl-dev openssl

Create icinga user:

sudo useradd -m icinga

sudo passwd icinga

Create icinga-cmd group:

sudo groupadd icinga-cmd

sudo usermod -a -G icinga-cmd icinga

sudo usermod -a -G icinga-cmd www-data

Download Icinga:

cd /usr/src

git clone git://git.icinga.org/icinga-core.git

Configure, compile, install Icinga:

cd icinga-core

sudo ./configure --enable-idoutils --with-command-group=icinga-cmd

sudo make all

sudo make fullinstall

Install sample configuration files:

sudo make install-config

Copy sample IDOUtils config files to the installation:

cd /usr/local/icinga/etc

sudo cp idomod.cfg-sample idomod.cfg

sudo cp ido2db.cfg-sample ido2db.cfg

Enable idomod event broker:

sudo nano /usr/local/icinga/etc/icinga.cfg

Uncomment the line beginning with broker_module (under the line # Uncomment this to enable idomod.o)

Create IDOUtils Database:

sudo mysql -u root –p

mysql> CREATE DATABASE icinga;

mysql> GRANT USAGE ON *.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH

MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;

Page 2: How to Install Icinga on Ubuntu 10.04 (Lucid) With web api IDOUtils, NConf

mysql> GRANT SELECT , INSERT , UPDATE , DELETE ON icinga.* TO 'icinga'@'localhost';

mysql> FLUSH PRIVILEGES ;

mysql> quit

Import database schema:

cd /usr/src/icinga-core/module/idoutils/db

sudo mysql -u root -p icinga < mysql.sql

Edit the IDOUtils config file and ensure the following:

sudo nano /usr/local/icinga/etc/ido2db.cfg

db_servertype=mysql

db_port=3306

db_user=icinga

db_pass=icinga

Configure web interface and web admin user account:

cd /usr/src/icinga-core

sudo make install-webconf

sudo htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin

Remember the password you specify for icingaadmin, you'll need it later to log in to the icinga.

sudo /etc/init.d/apache2 reload

sudo chgrp -R www-data /usr/local/icinga/var/rw

Download and install Nagios plugins:

cd /usr/src

sudo wget <a

href="http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.15/nagios-

plugins-1.4.15.tar.gz"

title="http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.15/nagios-

plugins-

1.4.15.tar.gz">http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.15/na...

</a>

sudo tar xzvf nagios-plugins-1.4.15.tar.gz

cd nagios-plugins-1.4.15

sudo ./configure --prefix=/usr/local/icinga --with-nagios-user=icinga --with-

openssl=/usr/bin/openssl

sudo make

sudo make install

NOTE: The option --with-openssl can be left out if you aren't going to monitor any ssl web services.

Add Icinga and IDOUtils to startup services:

sudo update-rc.d icinga defaults

Page 3: How to Install Icinga on Ubuntu 10.04 (Lucid) With web api IDOUtils, NConf

sudo update-rc.d ido2db defaults

Verify Icinga installation:

There should be no errors!

sudo /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg

Home Servicing and IDOUtils

sudo service ido2db start

sudo service icinga start

Make sure you can logon to http://<server_address>/icinga using the password you previously created

for icingaadmin.

Download and install NConf:

cd /usr/src

sudo wget <a href="http://downloads.sourceforge.net/project/nconf/nconf/1.2.6-0/nconf-

1.2.6-0.tgz" title="http://downloads.sourceforge.net/project/nconf/nconf/1.2.6-0/nconf-

1.2.6-0.tgz">http://downloads.sourceforge.net/project/nconf/nconf/1.2.6-0/nconf-

1.2.6...</a>

sudo tar xzvf nconf-1.2.6-0.tgz

sudo mv nconf /var/www

sudo chown -R www-data:www-data /var/www/nconf

Configure Apache for NConf:

sudo nano /etc/apache2/conf.d/nconf.conf

Paste in the following:

<Directory "/var/www/nconf">

# SSLRequireSSL

Options None

AllowOverride None

Order allow,deny

Allow from all

# Order deny,allow

# Deny from all