One service on more hosts with different contacts


#1

Hi.

I have to run a lot of tests on 200+ hosts. I always try to add services to hosts using hostgroup_name, because I can easily configure a lot of tests in few minutes. But now I need to have different contacts on different hosts and I don’t know how to do that.

Example:
lets say I have host1, host2 … host10. I have to monitor - lets say - CPU on all hosts. So associate service CPU to all hosts with hostgroup_name should be easy. But I have to send CPU alerts for host1 to contact1, CPU alerts for host2 to contact2 …

I tried to use macros like $CONTACTNAME$ or $HOSTNAME$ to identify different contacts, but these macros are not defined in “define service” context.

Do you have any ideas how to do that? May be there is another way, how to do that… Anyway, I don’t want to configure 200*12 tests separately:(

Thanks


#2

redefine the hosts defining only the contacts line… wouldn’t that do what you need?


#3

Thanks luca.

I’m so stupid…why didn’t I found that by my self? :slight_smile:

So I added contacts to host definition. I tried to override “host” contacts with “service” contacts and contacts in service definition have higher priority. This way I’m able to send notifications for some services to the hostX admin and the rest of notifications to me…that is even more than I expested.

Thans again