Excluding contact from contactgroup

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
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Excluding contact from contactgroup

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Excluding contact from contactgroup

Post 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.
Former Nagios employee
https://www.mcapra.com/
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: Excluding contact from contactgroup

Post by amprantino »

It would be very practical if it could be added in the future.

Thank you for your reply
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Excluding contact from contactgroup

Post 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
Former Nagios employee
https://www.mcapra.com/
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: Excluding contact from contactgroup

Post by amprantino »

Unfortunately I can't.
This is what I first tried, but I get the error "contact is not defined"
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Excluding contact from contactgroup

Post 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.
Former Nagios employee
https://www.mcapra.com/
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: Excluding contact from contactgroup

Post by amprantino »

This is an issue (it should work but it doesnt) or a feature request? :-)
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Excluding contact from contactgroup

Post 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
Former Nagios employee
https://www.mcapra.com/
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: Excluding contact from contactgroup

Post by amprantino »

tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Excluding contact from contactgroup

Post by tmcdonald »

I see there is some activity in that issue so I will be closing this forum thread.
Former Nagios employee
Locked