Question regarding escalation/notification
Stefan Giesen
Stefan.Giesen at firstgate.de
Tue Aug 10 12:50:50 CEST 2004
Hi all,
I've got a question about the notifications if you use the
escalations.cfg.
In our setup, we need the following (all notifications should be sent if
the HARD state changes to u, c or r):
1. A single email to "monitor at mydomain.de" if any host/service changes
state to d,u,r
2. A SMS should be send out to the first administrator with the first
notification and later every minute until the host/service recovers
3. A SMS should be send out to the second administrator with the sixth
notification and later every minute until the host/sercive recovers
I've the following contacts (only relevant parts listed, notify-by-sms
is a script which takes admin1/2 as parameter and uses the correct
mobile number for the first/second admin-of-the-day):
define contact{
contact_name monitor-mydomain-de
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email monitor at mydomain.de
}
define contact{
contact_name admin1
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-sms
host_notification_commands host-notify-by-sms
pager admin1
}
define contact{
contact_name admin2
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-sms
host_notification_commands host-notify-by-sms
pager admin2
}
define contactgroup{
contactgroup_name monitor-email
members monitor-mydomain.de
}
define contactgroup{
contactgroup_name admin1-sms
members admin1
}
define contactgroup{
contactgroup_name admin2-sms
members admin2
}
example service entry:
define service{
use generic-service
service_description IMAP
host_name myhost.mydomain.de
check_period 24x7
max_check_attempts 2
normal_check_interval 1
retry_check_interval 1
notification_period 24x7
notification_interval 1
notification_options u,c,r
contact_groups monitor-email
check_command check-imap
}
escalations for this service (overlapping configs used):
define serviceescalation{
host_name myhost.mydomain.de
service_description IMAP
first_notification 1
last_notification 1
contact_groups monitor-email
notification_interval 1
}
define serviceescalation{
host_name myhost.mydomain.de
service_description IMAP
first_notification 1
last_notification 0
contact_groups admin1-sms
notification_interval 1
}
define serviceescalation{
host_name myhost.mydomain.de
service_description IMAP
first_notification 6
last_notification 0
contact_groups admin2-sms
notification_interval 1
}
With this configuration, I got the following behaviour:
Services changes to HARD CRITICAL: email is send, SMS to admin1 is send,
then
1. Service gets immediately back (so only one notifcation was sent):
email is send, SMS to admin1 is sent -> OK
2. Service stays down: more SMS to admin1 are send, with the 6.
notification to admin2 as well -> OK
3. Service gets back AFTER ther first notification (it doesn' matter if
after 2 oder 30): SMS to admin1 is send, SMS to admin2 is send if more
than 5 notifications were sent before (that's OK, BUT) _NO_ recovery
notification is sent via email.
How comes? Or how can I add a one-shot email notification if a service
changes state? If I change the seviceescalation for the email to
"last_notification 0", I will get more than one email, if I change it to
"notification_interval 0", according to the documentation the lowest
notification interval will be used - which is one, so only one SMS will
be send out to each admin (tested that, the notification number remains
1 even after a new failed check, so admin1 would only get one SMS and
admin2 would never got one at all).
I tried it as well with just two non-overlapping escalations (one with
admin1-sms and the second with admin1-sms,admin2-sms as contact_group
entry, the first escalation starting at notification 2; with a contact
group entry of "monitor-email,admin1-sms" in the service itself) with
the same reuslt: the recovery email will not be send out.
Can anybody tell me how to solve this problem?
Thanks in advance,
Stefan
--
Stefan Giesen, Systemadministration Frankfurt
FIRSTGATE Internet AG, Im MediaPark 5, 50670 Koeln
Telefon: +49 (0) 2 21 / 45 45-745, Telefax: +49 (0) 2 21 / 45 45-710
Internet: www.firstgate.de eMail: Stefan.Giesen at firstgate.de
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list