The steps in this post no longer works and the product is already depreciated. Visit How To Monitor Remote Linux Machines with Icinga 2 for latest documentation.
Once you installed the Icinga, you can monitor the system via web interface; by default it is limited to monitor the local machine where Icinga installed. If you like to monitor the remote Linux box or Windows box, you need to have Nagios plugin and NRPE add-on installed on the remote box. Once installed the plugin and add-on, you need to configure the Icinga server to collect the information from the remote machine and display it on the web interface.
Before proceeding the installation, create a new user in the name of “icinga” and give it a password.
Extract the Nagios plugins tarball.
Compile and install the plugin.
Change the permission of the nagios plugin directory on the remote host.
Visit the Nagios download page and download the NRPE Add-on.
Once downloaded, Extract the tar ball.
NRPE is the part of the xinetd daemon, modify the NRPE configurations file to accept the connection from the Nagios server, Edit the /etc/xinetd.d/nrpe.
Add the Nagios server ip address like below.
Add NRPE port at the end of the /etc/services file.
Modify the /usr/local/icinga/etc/nrpe.cfg on the remote host, it contains the command argument to check the service on the remote host. The nrpe.cfg file contains the basic commands to check the remote services, below are the command lines to check the cpu load and running process. The check_load and check_total_procs has to be entered on template file on the server host to enable the monitoring.
In the above command -w stands for warning whereas -c stands for critical alert. For example if you execute the second command on the terminal, it will check the running process; it will warn when the process more than 150 or it will report critical when the process more than 200 and at the same time it will say OK if process below 150.
Change warning to 15 and critical to 150 for testing purpose, since process running on the server is very less. Now you can see the warning message, according to your requirement you can modify it.
On Icinga server we must have NRPE add-on installed and template of the remote host.
Now its the time configure the Icinga server to monitor the remote client, You’ll need to create a command definition in one of your Icinga object configuration files in order to use the check_nrpe plugin. Edit commands.cfg file.
Add the following command definition to the file.
Add the new template on the icinga.cfg configuration file, so that it will read the new entries.
Now login to the web interface and start do the monitoring. The following screenshot shows the remote Linux server with the default service available.
That’s All. Now you can easily monitor the remote machine with Icinga.