[UPDATED] HOWTO install NagVis 1.6.2 for icinga 1.5.1

// UPDATED on 2011/12/13: Changed from NagVis 1.6rc4 to 1.6 final
// UPDATED on 2011/12/19: Changed from NagVis 1.6 to 1.6.1
// UPDATED on 2011/12/20: Corrected path for variable “htmlcgi”
// UPDATED on 2011/12/28: Changed from NagVis 1.6.1 to 1.6.2 / Added Update Info

This Howto should work for Debian/Ubuntu/CentOS/RedHat/SuSe! Just remember, you maybe have to change the webserver user and group or the icinga path!

Website: http://www.nagvis.org/

wget http://sourceforge.net/projects/nagvis/files/NagVis%201.6/nagvis-1.6.2.tar.gz/download

Install dependencies and start install script

yum install rsync graphviz
tar -zxf nagvis-1.6.2.tar.gz
cd nagvis-1.6.2
./install.sh

Now answer the questions in the script, the first answer can be different! Depending on your system and either installed from source or from package!

Please enter the path to the nagios base directory [/usr/local/nagios]: /usr/share/icinga

Please enter the path to NagVis base [/usr/local/nagvis]:

Do you want to use backend mklivestatus? [y]: n
Do you want to use backend ndo2db? [n]: n
Do you want to use backend ido2db? [n]: y
Do you want to use backend merlinmy? [n]: n

Don’t care about

IDO Module ido2db (ido2db) ... MISSING

Next steps!

Please enter the web path to NagVis [/nagvis]:
Please enter the name of the web-server user [apache]:
Please enter the name of the web-server group [apache]:
create Apache config file [y]:

Do you really want to continue? [y]:

For later update/upgrade you may use this command to have a faster update:
./install.sh -n /usr/share/icinga -p /usr/local/nagvis -b ido2db -u apache -g apache -w /etc/httpd/conf.d -a y

Change the config similar to the pasted one.

vim /usr/local/nagvis/etc/nagvis.ini.php

ab Zeile 314

;statushost=""
; hostname for NDO-db
dbhost="localhost"
; portname for NDO-db
dbport=3306
; database name for NDO-db
dbname="icinga"
; username for NDO-db
dbuser="icinga"
; password for NDO-db
dbpass="PASSWORD"
; prefix for tables in NDO-db
dbprefix="icinga_"
; instance name for tables in NDO-db
;dbinstancename="default"
; maximum delay of the NDO Database in seconds
;maxtimewithoutupdate=180
; path to the cgi-bin of this backend
htmlcgi="/icinga/cgi-bin"

Login at http://localhost/nagvis with user/password = admin

Update your install

./install.sh -n /usr/share/icinga -p /usr/local/nagvis -b ido2db -u apache -g apache -w /etc/httpd/conf.d -a y

Follow the Install routine again, all the options should be fine
Delete the demo config files

rm -f /usr/local/nagvis/etc/maps/demo-*.cfg
rm -f /usr/local/nagvis/etc/automaps/demo-*.cfg

Check if it works as expected, if yes you can delete the backup files

rm -f /etc/httpd/conf.d/nagvis.conf.20*
rm -Rf /usr/local/nagvis.old*

Done!

HOWTO install icinga-web 1.5.2 from RPM package on CentOS 6.0

Install the dependencies, download the package and install it. Restart the Webserver to activate the new apache config in /etc/httpd/conf.d/icinga-web.conf. Then connect to the MySQL database to setup a new user.

More about the package, here: http://epis.ch/dr

yum install php php-cli php-pear php-xmlrpc php-xsl php-pdo php-gd php-ldap php-mysql perl-Locale-PO
wget http://daniel.oetken.cc/files/icinga-web-1.5.2-1.el6.noarch.rpm
yum install icinga-web-1.5.2-1.el6.noarch.rpm
service httpd restart
mysql -u root -p

Execute these querys

CREATE DATABASE icinga_web;
 GRANT USAGE ON *.* TO 'icinga_web'@'localhost'
   IDENTIFIED BY 'icinga_web'
   WITH MAX_QUERIES_PER_HOUR 0
   MAX_CONNECTIONS_PER_HOUR 0
   MAX_UPDATES_PER_HOUR 0;
 GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX
   ON icinga_web.* TO 'icinga_web'@'localhost';
 FLUSH PRIVILEGES ;
 quit

Import the Database scheme

cd /usr/share/icinga-web/etc/schema/
mysql -u root -p icinga_web < mysql.sql

Change the Database connection credentials

vim /etc/icinga-web/databases.xml

Caution! Now you have two databases, “icinga” the first one, is for all the monitored data. The second one is for the new Web UI _only_! In the “database.xml” you have to configure BOTH!

If the Web UI is still not working, see the logfiles!

//var/log/icinga-web/*.log
/var/log/messages
/var/log/icinga/icinga.log
/var/log/httpd/error_log

If you still don’t have any clue why it’s not working check the icinga-web test wiki

Try to login at http://localhost/icinga-web

user/password root/password

Source: icinga Documentation – icinga web from scratch

[OUTDATED] icinga-web 1.5.2 RPM package for CentOS 6.0

CAUTION! THIS ARTICLE IS OUTDATED CLICK HERE FOR THE UPDATED ARTICLE!

I did it! I created my first rpm package. It’s for the icinga-web and can be downloaded here:

http://daniel.oetken.cc/files/icinga-web-1.5.2-1.el6.noarch.rpm

Name        : icinga-web                   Relocations: (not relocatable)
Version     : 1.5.2                             Vendor: (none)
Release     : 1.el6                         Build Date: Fri 18 Nov 2011 01:09:44 PM PST
Install Date: (not installed)               Build Host: *
Group       : Applications/System           Source RPM: icinga-web-1.5.2-1.el6.src.rpm
Size        : 103586202                        License: GPLv2+
Signature   : (none)
URL         : http://www.icinga.org/
Summary     : Open Source host, service and network monitoring Web UI
Description :
Icinga Web for Icinga Core, uses Icinga IDOUtils DB as data source.

Install HOWTO is coming soon!

Diary Update # 15 some news

Hey everyone,

today or more yesterday, anyway, on Tuesday I went to an optical store to get new contact lenses. So they measured my visual acuity and the shocking news is ๐Ÿ˜€ it got worse. Before, I had -1.00 on both eyes and now my right eye has -1.75 and the left one -2.25. I bought 2-week lenses and finally I can see totally clear again ๐Ÿ˜€

That’s it. Good night everyone.

HOWTO install icinga-web 1.5.2 on CentOS 6.0

After you installed icinga, you might want to install the new Web UI as well. As far as I know, there are no RPM packages for icinga-web available in the common repositories (for me these are the defaults + rpmforge + epel: Use it at your own risk, for more information about the repositories read: CentOS Wiki), but I didn’t really search for it, so maybe I just missed it. Feel free to post comments.

Install icinga-web 1.5.2 on CentOS 6.0

cd /usr/local/src/
wget http://sourceforge.net/projects/icinga/files/icinga-web/1.5.2/icinga-web-1.5.2.tar.gz/download
tar -zxf icinga-web-1.5.2.tar.gz
yum install php php-cli php-pear php-xmlrpc php-xsl php-pdo php-gd php-ldap php-mysql

./configure --prefix=/usr/local/icinga-web --with-web-user=apache --with-web-group=apache --with-web-path=/icinga-web --with-web-apache-path=/etc/httpd/conf.d --with-db-type=mysql --with-db-host=localhost --with-db-port=3306 --with-db-name=icinga_web --with-db-user=icinga_web --with-db-pass=icinga_web --with-conf-folder=etc/conf.d --with-log-folder=log

make install

make testdeps

You don’t have to use this “configure” command with all these options, but it’s nice to have, easy to understand and easily customizable, see a list of all options with

./configure --help

create MySQL user and database:

#> mysql -u root -p
 mysql> CREATE DATABASE icinga_web;
 GRANT USAGE ON *.* TO 'icinga_web'@'localhost'
   IDENTIFIED BY 'icinga_web'
   WITH MAX_QUERIES_PER_HOUR 0
   MAX_CONNECTIONS_PER_HOUR 0
   MAX_UPDATES_PER_HOUR 0;
 GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX
   ON icinga_web.* TO 'icinga_web'@'localhost';
 FLUSH PRIVILEGES ;
 quit

Import the database scheme with the following command! Answer the question with “y” if you used the correct database credentials in the “configure” statement already. Otherwise choose “n” and type in the correct data manually.

make db-initialize
cp /usr/local/src/icinga-web-1.5.2/etc/apache2/icinga-web.conf /etc/httpd/conf.d/
service httpd restart

If you want to change the database connection data later, edit the file

/usr/local/icinga-web/etc/conf.d/databases.xml

Caution! Now you have two databases, “icinga” the first one, is for all the monitored data. The second one is for the new Web UI _only_! In the “database.xml” you have to configure BOTH!

If the Web UI is still not working, see the logfiles!

/usr/local/icinga-web/log/*.log
/var/log/messages
/var/log/icinga/icinga.log
/var/log/httpd/error_log

If you still don’t have any clue why it’s not working check the icinga-web test wiki

Try to login at http://localhost/icinga-web

user/password root/password

Source: icinga Documentation – icinga web from scratch

Stay tuned for more tutorials soon!

HOWTO install icinga 1.5.1 on CentOS 6.0

Icinga 1.5.1 installation on CentOS 6.0 – using the RPM files

//UPDATE 14/11/2011 – 10:22 PST: You will find the RPM packages in the RPMforge repository: Repoforge RPMforge // Use it at your own risk, for more information about the repositories read: CentOS Wiki)

yum install icinga icinga-idoutils icinga-gui libdbi-dbd-mysql

It’s automatically added to the default runlevels.

create MySQL user and database:

#> mysql -u root -p
 mysql> CREATE DATABASE icinga;
 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;
 GRANT SELECT , INSERT , UPDATE , DELETE
   ON icinga.* TO 'icinga'@'localhost';
 FLUSH PRIVILEGES ;
 quit

Please change the mysql data to your own!

Import database scheme for MySQL:

#> cd /etc/icinga/idoutils/mysql
#> mysql -u root -p icinga < mysql.sql

Change the mentioned database options in this file.

vim /etc/icinga/ido2db.cfg
db_servertype=mysql
db_port=3306
db_user=icinga
db_pass=icinga

Install basic modules.

UPDATE 18/11/2011 – 12:38 PST: added RPM Package install

From RPM Package

yum install nagios-plugins

change path in

/etc/icinga/resource.cfg
to
/usr/lib/nagios/plugins/

From Sources

http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/

wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz/download
tar -zxf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure --prefix=/usr/share/icinga \
--with-cgiurl=/icinga/cgi-bin --with-htmurl=/icinga \
--with-nagios-user=icinga --with-nagios-group=icinga

If the configure command is not working, see my other post: CentOS โ€œbuild-essentialsโ€ – http://epis.ch/dd

make
make install
vim /etc/icinga/resource.cfg

change the line, because this is the path where the plugins are!

$USER1$=/usr/share/icinga/libexec

Next steps

The webinterface has a .htaccess protection enabled, but without any user! So you have to create one.

vim /etc/icinga/htpasswd.users

Use this following line to have username = “icingaadmin” and password set to “icinga”

icingaadmin:{SHA}8XLF6eTYQKVTVogqK2RIRrMCshY=

disable SELinux, otherwise the Classic UI doesn’t work!

vim /etc/sysconfig/selinux

change line to

SELINUX=disabled

Now reboot the machine!

After that you can login to the Classic UI on http://localhost/icinga with username=icingaadmin/passwort=icinga

Source: icinga Documentation – http://docs.icinga.org/