|| what is icinga web
Icinga Web is an online portal to view Icinga monitoring results and send commands to the Icinga Core. Host and service status, history, notifications and status maps are available to keep a check on the health of your network in real-time. :: icinga web
|| Required
you must have a running MySQL and PHP (with PEAR and CLI) environment and Icinga, Icinga-API and IDOUtils are running as well.
|| how to install icinga-web on Linux Debian
| installing php5 on debian 6.0
|
1 |
# apt-get install php5 php5-cli php-pear php5-xmlrpc php5-xsl php5-gd php5-ldap php5-mysql php5-pgsql |
| edit php.ini for memory_limit
|
1 2 |
# vi /etc/php5/cli/php.ini
memory_limit=128M |
| downloading icinga-web packages
|
1 2 |
# cd /usr/src/
# wget http://sourceforge.net/projects/icinga/files/icinga-web/1.3.1/icinga-web-1.3.1.tar.gz |
| compiling / build icinga web from source
|
1 2 3 4 5 6 7 |
# tar -xzf icinga-web-1.3.1.tar.gz
# cd icinga-web-1.3.1
# ./configure --prefix=/usr/local/icinga-web --with-web-user=www-data --with-web-group=www-data --with-web-path=/icinga-web --with-web-apache-path=/etc/apache2/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-icinga-api=/usr/local/icinga/share/icinga-api --with-api-type=CONNECTION_IDO --with-api-subtype=mysql --with-api-host=localhost --with-api-port=3306 --with-api-socket=none
# make install
# make install-apache-config
# make install-done
# make testdeps |
| create database for icinga-web
|
1 2 3 4 5 6 |
mysql> GRANT USAGE ON *.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'icinga_web';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON icinga_web.* TO 'icinga_web'@'localhost';
mysql> CREATE DATABASE icinga_web;
mysql> 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;
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON icinga_web.* TO 'icinga_web'@'localhost';
mysql> quit |
| initialize icinga-web db
|
1 |
# make db-initialize |
| configure xml database icinga web
|
1 2 |
# cd /usr/local/icinga-web/
# vi app/config/databases.xml |
check on database name, username and password, like:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<databases default="icinga_web">
<database name="icinga_web" class="AgaviDoctrineDatabase">
<!--
Doctrine dsn strings:
http://www.doctrine-project.org/documentation/manual/1_1/en/introduction-to-connections
-->
<ae:parameter name="dsn">mysql://icinga_web:icinga_web@127.0.0.1:3306/icinga_web</ae:parameter>
<!-- Generic credentials -->
<!-- <ae:parameter name="username">icinga_web</ae:parameter> -->
<!-- <ae:parameter name="password">icinga_web</ae:parameter> -->
<!-- DB encoding type -->
<ae:parameter name="charset">utf8</ae:parameter>
<!--
Doctrine_Manager configuration
-->
<ae:parameter name="manager_attributes">
<!-- This allows lazy loading of the models -->
<ae:parameter name="Doctrine_Core::ATTR_MODEL_LOADING">CONSERVATIVE</ae:parameter>
</ae:parameter>
<!-- The path to our models -->
<ae:parameter name="load_models">%core.module_dir%/AppKit/lib/database/models/generated</ae:parameter>
<ae:parameter name="models_directory">%core.module_dir%/AppKit/lib/database/models</ae:parameter>
</database> |
| configure xml for icinga-core
|
1 |
# vi app/modules/Web/config/icinga-io.xml |
checking on database connection, database name, username anda password, like:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<!--
See doc/icinga-api-types.txt for options
-->
<setting name="api.interfaces.data">
<!-- IcingaApi connection interface -->
<ae:parameter name="api_type">IcingaApi::CONNECTION_IDO</ae:parameter>
<!-- Suits for all interfaes -->
<ae:parameter name="config_type">mysql</ae:parameter>
<ae:parameter name="config_host">localhost</ae:parameter>
<ae:parameter name="config_port">3306</ae:parameter>
<!-- ###BEGIN_CONNECTION_IDO### -->
<!-- Database specific (IcingaApi::CONNECTION_IDO) -->
<ae:parameter name="config_database">icinga</ae:parameter>
<ae:parameter name="config_user">icinga</ae:parameter>
<ae:parameter name="config_password">icinga</ae:parameter>
<ae:parameter name="config_table_prefix">icinga_</ae:parameter>
<!-- ###END_CONNECTION_IDO### -->
</setting> |
| configure module.xml for db connection
|
1 |
# vi app/modules/Web/config/module.xml |
add these line before </module> :
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<!--
See doc/icinga-api-types.txt for options
-->
<setting name="api.interfaces.data">
<!-- IcingaApi connection interface -->
<ae:parameter name="api_type">IcingaApi::CONNECTION_IDO</ae:parameter>
<!-- Suits for all interfaes -->
<ae:parameter name="config_type">mysql</ae:parameter>
<ae:parameter name="config_host">localhost</ae:parameter>
<ae:parameter name="config_port">3306</ae:parameter>
<!-- ###BEGIN_CONNECTION_IDO### -->
<!-- Database specific (IcingaApi::CONNECTION_IDO) -->
<ae:parameter name="config_database">icinga</ae:parameter>
<ae:parameter name="config_user">icinga</ae:parameter>
<ae:parameter name="config_password">icinga</ae:parameter>
<ae:parameter name="config_table_prefix">icinga_</ae:parameter>
<!-- ###END_CONNECTION_IDO### -->
</setting> |
| clear cache icingan web
|
1 |
# /usr/local/icinga-web/bin/clearcache.sh |
| reload mod_rewrite on httpd / apache
|
1 |
# a2enmod rewrite |
|| restarting httpd / apache
|
1 |
# /etc/init.d/apache2 restart |
|| testing icingan web
open your browser and goto:
|
1 |
http://yourhostname.tld/icinga-web |
|| link
| google
| icinga-web
This helped a LOT installing on CentOS 5.6
Good job!
Thank you.
hello Greetings, I am still very new in this, and I found this very nice article, thanks a lot