Bug with escalations in Nagios?

Jorge Daniel Sequeira Matias martin at andorinha.ist.utl.pt
Thu Mar 16 14:51:34 CET 2006


  Hello everyone,

  I have a problem with host and service escalations in Nagios 2.0. I have 
upgraded to Nagios 2.0 when I tried to use escalations and thought there was 
a bug in Nagios 1.2. I'm going to describe the problem:

  I'd like to escalate the notifications to send only once an SMS about an 
HOST or SERVICE DOWN, but still have the e-mails being sent periodically.
  To get things even more complicated I would like that, in some cases, the 
SMS to sent only in the nightly hours.
  For start I have built a config using only 24x7 time periods. This way I 
prepared the following config:

  (See the results after this sample config)

-- start of sample config --
# 'sms-host' host group definition
define hostgroup {
        hostgroup_name  sms-host
        alias           SMS Hosts
        members testhost
}

define host {
  host_name                    testhost
  alias                        testhost
  address                      1.2.3.4
  check_command                check-host-alive
  active_checks_enabled        1
  checks_enabled               1
  max_check_attempts           3
  check_interval               5
  notification_interval        5
  contact_groups               testhost-email-contacts,testhost-sms-contacts
}

# Send the first notification to the SMS-Contacts (only when DOWN)
define hostescalation {
  host_name             testhost
  contact_groups        testhost-sms-contacts
  first_notification    1
  last_notification     1
  notification_interval 5
  escalation_period     24x7
  escalation_options    d
}

# Send notifications to e-mail contacts periodically since the beginning
# of the problem until RECOVERY.
define hostescalation {
  host_name             testhost
  contact_groups        testhost-email-contacts
  first_notification    1
  last_notification     0
  notification_interval 5
  escalation_period     24x7
  escalation_options    d,u,r
}

# For the service let's try a different approach
# The first notification will use service default "contact_groups"
define service {
  host_name             testhost
  service_description   SSH
  check_command         check_ssh
  max_check_attempts    3
  normal_check_interval 5
  retry_check_interval  1
  check_period          24x7
  notification_interval 5
  notification_period   24x7
  notification_options  c,r
  contact_groups        testhost-email-contacts,testhost-sms-contacts
}

# The rest of notifications send only to email contacts
define serviceescalation {
  host_name             testhost
  service_description   SSH
  first_notification    2
  last_notification     0
  notification_interval 5
  contact_groups        testhost-email-contacts
}
-- end of sample config --


  The Results:

  For the host config, Nagios doesn't send any notification at all no matter 
the host status is (DOWN, UNREACHABLE or RECOVERY)!
  For the service config it sends the first notification to both e-mail and 
sms contacts and rest of notifications only to e-mail contacts.

  The service config approach almost does what I need, but doesn't let change 
the timeperiod of the first notification for the sms contacts without 
affecting the e-mail contacts too.
  Of course the notification intervals are short for test purposes only.

  The problem:

  Why Nagios doesn't send any notification at all with sample host config? 
What am I doing wrong? Is there a global variable config that I have missed 
in documentation that could change escalations behaviour?

  I have read several times this explanation about escalation and I can't 
reproduce the same behaviour the document states:

  http://nagios.sourceforge.net/docs/2_0/escalations.html

  Thanks in advance for the help!


Best Regards,
Jorge Matias 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
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