usermod -G icinga apache
5. cd /root/icinga
tar zxf icinga-1.10.2.tar.gz
cd icinga-1.10.2
./configure --with-command-group=icinga
6. make all; make fullinstall; make install-config
7. vi /usr/local/icinga/etc/objects/contacts.cfg
change the email address associated with the icingaadmin contact definition
8. cd /usr/local/icinga/etc/
mv idomod.cfg-sample idomod.cfg
mv ido2db.cfg-sample ido2db.cfg
cd modules; mv idoutils.cfg-sample idoutils.cfg
9. service mysqld start; chkconfig mysqld on
mysql -uroot
mysql> CREATE DATABASE icinga;
mysql> GRANT USAGE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
cd /root/icinga/icinga-1.10.2/module/idoutils/db/mysql/
mysql icinga < mysql.sql
10. vi /usr/local/icinga/etc/ido2db.cfg to verify
db_servertype=mysql
db_port=3306
db_user=icinga
db_pass=icinga
11. vi /etc/httpd/conf/httpd.conf to set ServerName
12. cd /root/icinga/icinga-1.10.2
make cgis; make install-cgis; make install-html; make install-webconf; make install-webconf-auth
13. touch /var/www/html/index.html
service httpd start; chkconfig httpd on
14. tar xvzf nagios-plugins-1.5.tar.gz
cd nagios-plugins-1.5
./configure --prefix=/usr/local/icinga --with-cgiurl=/icinga/cgi-bin --with-nagios-user=icinga --with-nagios-group=icinga
make && make install
15. service ido2db start; chkconfig ido2db on
/usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
service icinga start; chkconfig icinga on
16. http://icinga-server/icinga
Default login icingaadmin:icingaadmin - new users can be added with
htpasswd /usr/local/icinga/etc/htpasswd.users
Icinga web installation
1. yum -y install php php-cli php-pear php-xmlrpc php-xsl php-pdo php-soap php-gd php-ldap php-mysql
2. cd /root/icinga
tar zxf icinga-web-1.10.0.tar.gz
cd icinga-web-1.10.0
./configure --with-web-user=apache --with-web-group=apache --with-web-apache-path=/etc/httpd/conf.d
make install; make install-apache-config
3. mysql -uroot
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> FLUSH PRIVILEGES;
mysql> quit
4.cd /root/icinga/icinga-web-1.10.0/etc/schema
mysql icinga_web < mysql.sql
5.service httpd restart
6. http://icinga-server/icinga-web
Default login root:password
Integrate PNP4Nagios 0.6 in Bulk Mode with NPCD and npcdmod with Icinga classic GUI
2. cd /root/icinga
tar zxf pnp4nagios-0.6.21.tar.gz
cd pnp4nagios-0.6.21/
./configure --with-nagios-user=icinga --with-nagios-group=icinga
make all && make fullinstall
3. mv /usr/local/pnp4nagios/share/install.php /usr/local/pnp4nagios/share/install.php.ignore
4. cd /usr/local/pnp4nagios/etc
mv misccommands.cfg-sample misccommands.cfg
mv nagios.cfg-sample nagios.cfg
mv rra.cfg-sample rra.cfg
rm -rf config_local.php config.php.0.6.21
vi config.php
$conf['nagios_base'] = "/icinga/cgi-bin"; cd pages
mv web_traffic.cfg-sample web_traffic.cfg
cd ../check_commands
mv check_all_local_disks.cfg-sample check_all_local_disks.cfg
mv check_nrpe.cfg-sample check_nrpe.cfg
mv check_nwstat.cfg-sample check_nwstat.cfg
5. using Bulk Mode with NPCD and npcdmod for PNP4Nagios
vi /usr/local/icinga/etc/icinga.cfg
process_performance_data=1
cp /root/icinga/pnp4nagios-0.6.21/contrib/ssi/status-header.ssi /usr/local/icinga/share/ssi/
chown icinga.icinga /usr/local/icinga/share/ssi/status-header.ssi
7. vi /usr/local/icinga/etc/objects/templates.cfg
Add host and service definition at bottom of file
define host {
name host-pnp
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_
register 0
}
define service {
name srv-pnp
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
register 0
}
define host{
name generic-host
use host-pnp
define service{
name generic-service
use srv-pnp
1. yum -y install php php-gd php-gettext php-mbstring php-mysql php-pdo phpsqlite php-xml graphviz graphviz-gd graphviz-php rsync
2. tar zxf nagvis-1.8b2.tar.gz
cd nagvis-1.8b2
./install.sh
Please enter the path to the nagios base directory [/usr/local/nagios]: /usr/local/icinga
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
3. vi /usr/local/nagvis/etc/nagvis.ini.php
[backend_ndomy_1]
; 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="icinga"
; prefix for tables in NDO-db
dbprefix="icinga_"
; instance name for tables in NDO-db
dbinstancename="default"
4. service httpd restart
http://icinga-server/nagvis with admin:admin
5. Log in to the NagVis web interface, and click on Manage Maps under the Options menu:
6. Under Create Map:
1. For Map name, enter the value automap.
2. For Map iconset, choose std_small.
3. Leave Background blank.
4. Click on Create.
7. Click on Map Options under the Edit Map menu.
8. In the resulting dialog:
1. Check the sources checkbox, and change the value to automap.
2. Check the backend_id checkbox, and choose the value ndomy_1.
3. Scroll down to the bottom and click on Save.
9. With this done, the page should refresh and show you a map of your network, automaticall generated from your configuration, in a similar style to the Icinga classic gui interface status map. You should also be able to hover over individual nodes to see their details.
3. vi /usr/local/check_mk/etc/multisite.mk
admin_users = [ "icingaadmin" ]
service icinga restart
service httpd restart
4. http://icinga-server/check_mk/ using icingaadmin:icingaadmin
5. Install the agent on localhost
yum -y install xinetd
service xinetd start; chkconfig xinetd on
cd /usr/local/check_mk/share/agents
cp check_mk_agent.linux /usr/bin/check_mk_agent
cp waitmax /usr/bin
cp xinetd.conf /etc/xinetd.d/check_mk
service xinetd restart
vi /usr/local/check_mk/etc/main.mk
all_hosts = [ "localhost" ]
vi /usr/local/icinga/etc/icinga.cfg
comment cfg_file lines as below:
log_external_commands=0
log_passive_checks=0
/usr/local/check_mk/bin/cmk -I localhost
vi /usr/local/check_mk/var/autochecks/localhost.mk to remove unwanted item as you needed/usr/local/check_mk/bin/cmk -R
http://icinga-server/check_mk/ using icingaadmin:icingaadmin
Remove monitored client from check_mk
vi /usr/local/check_mk/etc/main.mk
remove item for it
/usr/local/check_mk/bin/cmk -R
Modify service for monitored client
vi /usr/local/check_mk/var/autochecks/*.mk to remove unneed item
/usr/local/check_mk/bin/cmk -R
renew service for host
/usr/local/check_mk/bin/cmk -II host-name
vi /usr/local/check_mk/var/autochecks/*.mk to remove unneed item
/usr/local/check_mk/bin/cmk -R for linux and windows check_mk agent installation, please refer http://hj192837.blog.运维网.com/655995/1359213
Managing NagVis permissions in WATO
As this module only works in OMD environments at the moment now , we should remove it from check_mk available snapins
cd /usr/local/check_mk/share/web/plugins/sidebar/
mv nagvis_maps.py nagvis_maps.py.bak
service icinga restart
service httpd restart
Interface in PNP service graph has red error issue:
1. you will find below error
2. to resolve this issue, just upgrade to rrdtool 1.4
yum -y install ruby
rpm -Fvh rrdtool-perl-1.4.7-1.el6.wrl.x86_64.rpm rrdtool-1.4.7-1.el6.wrl.x86_64.rpm
To get popup PNP graph in check_mk
1. vi /usr/local/nagios/etc/nagios.cfg
broker_module=/usr/local/check_mk/lib/livestatus.o pnp_path=/usr/local/pnp4nagios/var/perfdata /usr/local/nagios/var/rw/live