contact_groups exception

Hello all,

This seems like it should be easy to do, but I can’t quite make it work. We’ve got a setup with templates for printers, with each template sending notifications to a specified contact_group. What I’d like to do is continue to use the template, but specify contact overrides / exceptions for certain specific printers. So for example:

  1. The contact_group its-admins is defined to include user1, user2, user3.
  2. The template its-printers has a config line to include the above group: “contact_groups its-admins”.
  3. The printer printer1 is defined to use the template its-printers.
  4. BUT the printer printer1 makes its own local modifications to the contact list.

Now it seems easy enough to ADD a contact, by just adding a line “contacts user4” to the config for the printer, but I can’t find any way to exclude one. I had thought something like “contacts !user2” might exclude user2 while leaving the rest of the contact_group it-admins intact, but that doesn’t work (at least not in 3.02.) Is there a way to do what I want? (Note that simply manually specifying the contacts for printer1 isn’t really good enough, since it won’t pick up on any new members added to the its-admins group that way…)

Thanks for any advice,

 - rob.

never tried… how about:
contact_group it-admins!contact2

i’m no tsure you can mix conatct groups and contacts… but possibly it works using groups only…

contact_groups it-admins!group_x

where group_x is the contact you don’t want in the list… worth a couple of tries.

Didn’t think of doing it that way; thanks. Its not quite as good as what I wanted (I simplified my example; the actual host is a member of a number of different contact_groups) but it has the advantage of not causing an invalid config error when I try to start it up; hurrah! I’ll have to wait a bit to see if it actually works…

which one worked? :slight_smile:
please update when you confirmed it, possibly somebody looking for the same “problem” will then be able to find it in the future :slight_smile:

Short answer; it accepted:

contact_groups group1!user1,group2

I’ll describe the whole thing in detail once I’m sure it worked… the net is full of plenty of wrong answers already!