How to add targeted Host in Nagios?
Today, We will learn how to add another server or other hosts which lives or server is ping or not. If you want to monitor various services on other hosts, then you need to install NRPE agent on target host.
1. This example shows to add a target “node01.youknowlinux.com [10.10.0.201]”.
[root@youknow~]#mkdir /etc/nagios/servers
[root@youknow~]#chgrp nagios /etc/nagios/servers
[root@youknow~]#chmod 750 /etc/nagios/servers
[root@youknow~]#vi /etc/nagios/servers/node01.cfg
# create new
define host
{
use linux-server
host_name node01
alias node01
address 10.10.0.201
}
define service
{
use generic-service
host_name node01
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
[root@master ~]#/etc/rc.d/init.d/nagios restart
Running configuration check…done.
Stopping nagios: .done.
Starting nagios: done.
2. You can access Nagios admin site and confirm the target hosts added or not.
How to add targeted Host in Nagios