Nagios escalations(host/service) doesn't work properly.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ugurengin
Posts: 3
Joined: Thu Feb 13, 2014 9:30 am

Nagios escalations(host/service) doesn't work properly.

Post by ugurengin »

Hi there,

I was created a hostescalation which is contain one host config, but it doesn’t work properly when i set all settings for the escalation purpose.Email doesn't come to the second email adress using escalation process.

I read all suggestion to create escalation process, but still does not resolve the problem.Is there any solution to solve this cause ? Thank you.

Nagios Version: 4.0.2
My configurations are below:

Host config:

define host {
host_name operasyon_test
alias operasyon_test
address 10.10.10.20
check_command check-host-alive
max_check_attempts 1
check_interval 2
retry_interval 1
check_period 24×7
contacts first_mail
notification_interval 1
notification_period 24×7
notification_options d,u,r,f
notifications_enabled 1
register 1
}

Hostescalation config:

define hostescalation {
host_name operasyon_test
contacts second_mail
first_notification 2
last_notification 1
notification_interval 5
escalation_period 24×7
escalation_options d,u,r
register 1
}
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios escalations(host/service) doesn't work properly.

Post by tmcdonald »

ugurengin wrote: define hostescalation {
host_name operasyon_test
contacts second_mail
first_notification 2
last_notification 1

notification_interval 5
escalation_period 24×7
escalation_options d,u,r
register 1
}
Is there any particular reason you want the first email sent out after the last email? Nagios is good at what it does, but we don't support time travel yet :)

You'll want to change first_notification to 2 and last_notification to 2 as well. That will make it so the first notification goes out to just the contact first_mail, and the second notification will go to second_mail. After that, since last_notification is 2, the emails will go back to first_mail.
Former Nagios employee
ugurengin
Posts: 3
Joined: Thu Feb 13, 2014 9:30 am

Re: Nagios escalations(host/service) doesn't work properly.

Post by ugurengin »

Hi tmcdonald ,

I am just testing the escalation processes to understandt it before usage in our monitoring system.I updated notification settings as your suggestion, but there is no change although host is down.Thus nagios cannot escalate the notification to send email to "second_email", so escalation settings does not work.

Maybe i am doing somethings wrong.

Could you please send me a working config which contain host and service escalation.

Thank you so much.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios escalations(host/service) doesn't work properly.

Post by sreinhardt »

Could you give us a little more detailed example of what you are looking to do with your configuration here before we start giving out examples?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ugurengin
Posts: 3
Joined: Thu Feb 13, 2014 9:30 am

Re: Nagios escalations(host/service) doesn't work properly.

Post by ugurengin »

Basically i want to escalate the notifications if problem is not fixed in periodically times for host and services.As i wrote latest post that i just want to sent a notification using the host escalation settings.My detailed example is below, but host escalation settings doesn't work.Notifications cannot to sent "second_mail" contact after the host is down status.

In order to these settings, after the two down messages sent out to "first_mail" , but if problem is not fixed in related time, mail notifications must be sent to "operasyon_test" contact address between 5 times.

My config:

define host {
host_name operasyon_test
alias operasyon_test
address 10.10.10.20
check_command check-host-alive
max_check_attempts 1
check_interval 2
retry_interval 1
check_period 24×7
contacts first_mail
notification_interval 1
notification_period 24×7
notification_options d,u,r,f
notifications_enabled 1
register 1
}

Hostescalation config:

define hostescalation {
host_name operasyon_test
contacts second_mail
first_notification 2
last_notification 2
notification_interval 5
escalation_period 24×7
escalation_options d,u,r
register 1
}
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios escalations(host/service) doesn't work properly.

Post by slansing »

The way you currently have this set up on the 2nd notification a duplicate of that notification will be escalated ONCE to the contact you have defined there, and nothing else after that. This is defined here, as well as including some examples:

http://nagios.sourceforge.net/docs/3_0/ ... escalation
Locked