Notify only the right host contact(group)


#1

using Nagios v3.0.6.

I have tried to minimize the service definitions by utilizing hostgroups,eg:

check_ping will run on *** (ALL hosts)**

This however results in notification emails being sent to ALL contacts when the service fails, instead of the desired host contact only, eg

send email only to user1, if service on host1 failed
send email only to user2 if service on host2 failed
and so on (where hosts 1,2 belong to * of course and user1 is the contact person for host1, etc.)

Does Nagios have the logic to pick the right contact somehow?

It must be a common configuration issue out there, so I hope someone has already figured out a way to do this, other than defining a separate service for each host (which is extremely cumbersome)

thank you!
Bill


#2

define a template and redefine only the contact for each host, but still you’ll need to define each hosts differnces.