Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My oncall rotation defines time periods based a persons geo graphic location. But our escalations need to go out to the entire team regardless of when they occur. Currently the only way I've found to configure this in nagios is to create two contacts for each person. One that is a specific timeperiod the other that is 24x7 then use the 24x7 contact in the escalations. I'd like to be able to only maintain 1 contact per person.

define contact {
    contact_name                        bobjones
    service_notification_period         ops-shift4-oncall
    host_notification_period            ops-shift4-oncall
    host_notification_options           d,u,r
    service_notification_commands       service-notify
    host_notification_commands          host-notify
    email                               bjones@foo.com
    pager                               bjones
}

define contact {
    contact_name                        bobjones_24x7
    service_notification_period         24x7
    host_notification_period            24x7
    host_notification_options           d,u,r
    service_notification_commands       service-notify
    host_notification_commands          host-notify
    email                               bjones@foo.com
    pager                               bjones
}
share|improve this question

3 Answers 3

up vote 1 down vote accepted

You can use escalation_period to define when an escalation goes out. So you can do something like

define serviceescalation{
  hostname              host.example.com
  service_description   this service
  first_notification    1
  last_notification     1
  notificaiton_interval 15
  escalation_period     opps-shift4-oncall
  contact_groups        shift4
}


define serviceescalation{
  hostname              host.example.com
  service_description   this service
  first_notification    1
  last_notification     1
  notification_interva  15
  escalation_period     opps-shift3-oncall
  contact_groups        shift3
}

etc.

Then make sure that the contact groups contain the appropriate people. That sends the first notification to the appropriate group depending on the time period. So you create a dummy group "no one" or something similar and put that in the service declaration, so that it doesn't actually send to anyone at all.

share|improve this answer

Have you checked out http://nagios.sourceforge.net/docs/1_0/escalations.html?
I think you can just add the one user to multiple contact groups to do what you want.

share|improve this answer
    
correct but I need to add every user, right now I have a group of contacts and a duplicate group of 24x7 contacts, which gets the escalations, but it's the same list just with different a different time period. That duplication is what I'm trying to avoid. –  Stick Jul 17 '09 at 18:38
    
what do you use the first set of contact definitions for? –  Catherine MacInnes Jul 17 '09 at 18:53
    
The first set defines the appropriate time period for that person, for example me I'm on the east coast for us that's say 1pm->5pm during that time I should get the first notification. However if I don't answer it should escalate to everyone regardless of what timezone they are in. –  Stick Jul 17 '09 at 19:00

It might not be appropriate for your situation, but I got around having multiple contacts for the same person in Nagios by using distro groups. Instead of setting up an individual, I setup up groups in exchange. The Nagios contacts never change, but the distro groups fluctuate all the time.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.