Page 1 of 1

Excluding contact from contactgroup

Posted: Tue Mar 07, 2017 3:57 am
by amprantino
Hello,

I have a host with defined contact_groups group1,group2

I don't define any contact under host services; so everything is inherited from host.
Is there any way to exclude specific contacts for a service?
Contact is a member of the groups group1 and group2

Best Regards

Re: Excluding contact from contactgroup

Posted: Tue Mar 07, 2017 4:20 pm
by mcapra
You would have to remove that contact from the contact group and manually add them to the respective services. I realize this is less than ideal, but it is a current limitation within how Nagios Core handles inheritance. There isn't currently a way to define an "excluded contact" in any way other than simply not including the contact.

Re: Excluding contact from contactgroup

Posted: Tue Mar 07, 2017 4:39 pm
by amprantino
It would be very practical if it could be added in the future.

Thank you for your reply

Re: Excluding contact from contactgroup

Posted: Wed Mar 08, 2017 3:52 pm
by mcapra
Out of curiosity, and since I don't have a good lab machine to test this on, are you able to exclude contacts in the same way in which one might exclude hosts?

If you had a contact group that contained the contact "alice", and you wanted to exclude "alice" for a particular host/service definition, does this produce the desired behavior:

Code: Select all

contacts !alice

Re: Excluding contact from contactgroup

Posted: Wed Mar 08, 2017 5:33 pm
by amprantino
Unfortunately I can't.
This is what I first tried, but I get the error "contact is not defined"

Re: Excluding contact from contactgroup

Posted: Thu Mar 09, 2017 1:16 pm
by mcapra
Yeah, I see the same behavior now. Feel free to open an issue on the Github with a reference to this thread:
https://github.com/NagiosEnterprises/nagioscore

The official GitHub project is the best place to get these sort of changes addressed.

Re: Excluding contact from contactgroup

Posted: Thu Mar 09, 2017 1:25 pm
by amprantino
This is an issue (it should work but it doesnt) or a feature request? :-)

Re: Excluding contact from contactgroup

Posted: Thu Mar 09, 2017 3:14 pm
by mcapra
The Github is all we have for Nagios Core. The "Issues" section is fine to file it under even though this isn't an "Issue" but rather a request for functionality.

An example from one of our more prolific community members:
https://github.com/NagiosEnterprises/na ... issues/342

Re: Excluding contact from contactgroup

Posted: Mon May 22, 2017 4:23 am
by amprantino

Re: Excluding contact from contactgroup

Posted: Mon May 22, 2017 9:13 am
by tmcdonald
I see there is some activity in that issue so I will be closing this forum thread.