Scientific Linux 6
Sponsored Link

Nagios - Add monitoring Target#12011/06/12

 
Add monitoring Target. It's possible to monitor other hosts which lives or not with ping on this configuration. If you'd like to monitor various services on other hosts, it need to install nrpe agent on target hosts.
[1] This example shows to add a target "node01.srv.world [10.0.0.101]".
[root@master ~]#
vi /etc/nagios/nagios.cfg
# line 52: uncomment

cfg_dir=/etc/nagios/servers
[root@master ~]#
mkdir /etc/nagios/servers

[root@master ~]#
chgrp nagios /etc/nagios/servers

[root@master ~]#
chmod 750 /etc/nagios/servers

[root@master ~]#
vi /etc/nagios/servers/node01.cfg
# create new

define host{
    use                     linux-server
    host_name               node01
    alias                   node01
    address                 10.0.0.101
}
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] Access to Nagios admin site and make sure target hosts would be added.
Matched Content