Exclude hosts from services

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
anil510
Posts: 1
Joined: Fri Sep 02, 2011 6:23 pm

Exclude hosts from services

Post 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?
Locked