Page 1 of 1

Exclude hosts from services

Posted: Fri Sep 02, 2011 6:32 pm
by anil510
Hello All,

I made a service definition and need to exclude a host from it. I tried the below and it throws error. cptest host is defined.

Code: Select all

define service{
        host_name               !cptest
        hostgroup_name          bluewho
        service_description     5-pop_conn
        check_command           check_nrpe!pop_conn
         use                     my-template
}

Error:

Code: Select all

Error: Could not expand hostgroups and/or hosts specified in service (config file '/usr/local/nagios/etc/services.cfg', starting on line 301)
   Error processing object config files!

What am I missing?