Monitoring the same service with two different contacts/time


#1

Am I missing something obvious here? I have a service I want to send notifications for to contactgroup “X” during business hours and contactgroup “Y” to during non-business hours. It looks like I cannot do it by defining the service twice, once with “contract_groups X” and “check_period (or) notfication_period nonbusinesshours” and again with “contract_groups Y” and “check_period (or) notification_period nonbusinesshours”, because Nagios complains about a duplicate service definition. I also want the notification intervals to be different for business and nonbusiness hours, so I can’t specify the service just once with BOTH contactgroups and special hours for each contactgroup.

I don’t want two separate services since I want the logs for the service to all be under one name.

Looks like I’ll need to do some clever service escalations.

Is this the way you have handled something like this in the past?

I’m also somewhat down rev, running 2.0rc2. If this sort of logic is improved upon is later version, sorry for the interruption,

TIA -W Sanders


#2

Well I set up escalations, with one escalation for workhours and the other for nonwork hours.

Both escalations have first_notification set to 1 and last_notification set to 0. Interestingly, the contact group for the service itself does not receive any notifications when first_ and last_notification is set this way.