Lets start with installing dbconfig-common. This package is used during the installation of the remaining software to ask the user questions about database access
apt-get install dbconfig-common
Now install the Icinga and Iciga-Idoutils packages, this should install a whole lot of dependencies as well
During the installation you’ll need to provide parameters for Postfix choose the default Internet site and the password of your MySQL root user. Be sure to provide valid answers because the information will be written to several files and changing them afterwards is annoying.
Now the first part is done and you should already be able to access your Icinga installation at http://yourhostname.com/icinga with the username ‘icingaadmin’ and the password you entered during installation.
Configuring idoutils and ido2db
To enable ido2db, edit /etc/default/icinga and set IDO2DB to ‘yes’ .
BUG if you are installing icinga 1.7.1 ++ you need to create a file manually
The only think you need to install on remote server is nrpe & nagios-plugins
In this example my remote host is a freeBSD server which i want to monitor remotely
pkg_add -r nagios-plugins nrpe
In the /etc/rc.conf file, add a line to enable the nrpe2 daemon.
nrpe2_enable="YES"
Configuration
In the /usr/local/etc directory, copy the nrpe.cfg-sample file to a file named nrpe.cfg. Use the chmod u+x nrpe.cfg command to add write permissions for the root user.
Open the file in a text editor, and look for the allowed_hosts=127.0.0.1 line. points to the address of your Nagios server.
allowed_hosts=127.0.0.1,icinga-server-ip
Start the NRPE daemon.
/usr/local/etc/rc.d/nrpe2 start
Now back to Icinga Server
cd /etc/icinga/objects
Edit
nano localhost_icinga.cfg
define host{
use generic-host ; Name of host template to use
host_name localhost
alias localhost
address 127.0.0.1
}
Add another host under it. FreeBSD Server
define host{
use generic-host ; Name of host template to use
host_name FreeBSD
alias FreeBSD
address ip-address-of-FreeBSD-server
}
Now at every service define your host seperated by " , " localhost,FreeBSD
host_name localhost,FreeBSD ; 2 hostname may be more depend of host you define
Example For One Service
define service{
use generic-service ; Name of service template to use
host_name localhost,FreeBSD
service_description Disk Space
check_command check_all_disks!20%!10%
}
Now Edit hostgroups_icinga.cfg for monitoring HTTP & SSH
nano hostgroups_icinga.cfg
define hostgroup {
hostgroup_name http-servers
alias HTTP servers
members localhost,FreeBSD
}
# A list of your ssh-accessible servers
define hostgroup {
hostgroup_name ssh-servers
alias SSH servers
members localhost,FreeBSD
}
Installing the neccessary software
Lets start with installing dbconfig-common. This package is used during the installation of the remaining software to ask the user questions about database access
Now install the Icinga and Iciga-Idoutils packages, this should install a whole lot of dependencies as well
Installing icinga
During the installation you’ll need to provide parameters for Postfix choose the default Internet site and the password of your MySQL root user. Be sure to provide valid answers because the information will be written to several files and changing them afterwards is annoying.
Now the first part is done and you should already be able to access your Icinga installation at http://yourhostname.com/icinga with the username ‘icingaadmin’ and the password you entered during installation.
Configuring idoutils and ido2db
To enable ido2db, edit /etc/default/icinga and set IDO2DB to ‘yes’ .
BUG if you are installing icinga 1.7.1 ++ you need to create a file manually
Now paste the following lines .
For Safe Side also do
UPDATED
Edit IDO2DB=no to yes
And Run
look in /var/log/syslog
Edit
nano /etc/icinga/objects/contacts_icinga.cfg
Change
Icinga-Web
http://yourhostname.com/icinga-web
Done
Monitoring Remote Host From Your Server
In this example my remote host is a freeBSD server which i want to monitor remotely
In the
/etc/rc.conf
file, add a line to enable the nrpe2 daemon.Configuration
In the
/usr/local/etc
directory, copy thenrpe.cfg-sample
file to a file namednrpe.cfg
. Use thechmod u+x nrpe.cfg
command to add write permissions for the root user.Open the file in a text editor, and look for the
allowed_hosts=127.0.0.1
line. points to the address of your Nagios server.Start the NRPE daemon.
Now back to Icinga Server
Edit
Add another host under it. FreeBSD Server
host_name localhost,FreeBSD ; 2 hostname may be more depend of host you define
Example For One Service
Now Edit hostgroups_icinga.cfg for monitoring HTTP & SSH
Now restart icinga
Now go to http://yourhostname.com/icinga OR http://yourhostname.com/icinga-web monitor your remote host from Ubuntu
Help
http://www.meier.ws/2012/02/icinga-1-6-as-a-monitoring-solution-on-ubuntu-12-04-part-1-installation/Page not found | Homepage von Michael Meier. Way Back MachineInstalling NRPE on FreeBSD 9.0
Setting up Icinga with IDOUtils on Ubuntu - HowTos - Icinga Wiki
Update