Page 1 of 1

Q: How to exclude a host from a service that is in a hostgrp

Posted: Tue Sep 13, 2011 6:10 pm
by jrmartin
Hello,
Nagios R1.7 prebuilt VM.

I have a service defined that I have applied to a hostgroup and it is working properly.

However, there are a few hosts that are in the hostgroup that I need to exclude from the service check.

Is it possible to exclude a host from a service check that has been defined in a hostgroup?

I read you can !hostname in the services .cfg file, but I checked mine and it states its autogenerated by QL and will be overwritten.

Is this possible in XI?
Thanks,
Jeff

Re: Q: How to exclude a host from a service that is in a hos

Posted: Wed Sep 14, 2011 12:55 pm
by mguthrie
Unfortunately I don't think it is at the moment. I came across this issue on an import in that the CCM just treated '!hostname' as a new host instead of an exclusion. It could be done by manually maintaining a config in the /usr/local/nagios/etc/static directory. The files in this directory are not managed by the Core Config Manager and can be manually edited.

Re: Q: How to exclude a host from a service that is in a hos

Posted: Wed Sep 14, 2011 1:42 pm
by jrmartin
okay, thanks for the information.

Re: Q: How to exclude a host from a service that is in a hos

Posted: Mon Jun 11, 2012 3:20 pm
by Jdawg2002
Is this possible yet in Nagios XI? I need to exclude several hosts from a service that are in a hostgroup assigned to that service. This is possible in the NagioSQL gui and also in Nagios core files by adding a "!" before the name in the service config definition.

Thanks.

Re: Q: How to exclude a host from a service that is in a hos

Posted: Mon Jun 11, 2012 4:22 pm
by scottwilkerson
This is not possible at this time without doing what mguthrie mentioned above