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
}
-
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.Stick : 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.Catherine MacInnes : what do you use the first set of contact definitions for?Stick : 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.From Keith -
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.
From Catherine MacInnes -
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.
From bread555
0 comments:
Post a Comment