escalation not works

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.
niraj_vara
Posts: 20
Joined: Thu Dec 13, 2012 1:38 am

escalation not works

Post by niraj_vara »

Hi

I have configured the nagios Nagios Core 3.4.4. I was configuring the escallation. but escalation not working.

For the esacalation I have added the following in contact.cfg


define contact{
contact_name xyz ; Short name of user
use escalate ; Inherit default values from generic-contact template (defined above)
alias escalate; Full name of user
email [email protected] <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
pager XXXXXXXXXXXX

}


define contactgroup{
contactgroup_name escalation
alias Nagios Administrators
members xyz
}


in
object configuration file localhost.cfg I have added the following

Note : admins groups is my default group.
to configure serviceescalation I have taken refrence from the http://nagios.sourceforge.net/docs/3_0/escalations.html

define service{
use local-service ; Name of service template to use
host_name localhost
service_description Root Partition
check_command check_local_disk!50%!40%!/
#check_command check_local_disk!20%!10%!/
contact_groups sms
}




efine serviceescalation{
host_name localhost
service_description Root Partition
first_notification 3
last_notification 5
contact_groups admins
}

define serviceescalation{
host_name localhost
service_description Root Partition
first_notification 6
last_notification 8
contact_groups admins,xyz
}


serviceescation define but it not works only service define is working and getting trigger for the same.
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: escalation not works

Post by gshergill »

Hi niraj_vara,

First thing to mention is that you need to define the notification_interval on the service escalations.
serviceescation define but it not works only service define is working and getting trigger for the same.
Do you mean only the standard notifications are working? i.e. it is only sending to the contact_group sms (defined in the service)?

Also, you have the following down;

Code: Select all

define serviceescalation{
host_name localhost
service_description Root Partition
first_notification 6
last_notification 8
contact_groups admins,xyz
}
From what you've pasted before, there is no contact_group xyz, the contact is xyz and the group is escalation.

I assume that is a mistake in what you've pasted here and not on the server? Otherwise it wouldn't let you restart (the pre-flight check would fail).

So the first thing to do is define a notification_interval and see if that helps.

Good luck!

Kind Regards,

Gary Shergill
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: escalation not works

Post by scottwilkerson »

Thanks Gary, looks spot on to me...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
niraj_vara
Posts: 20
Joined: Thu Dec 13, 2012 1:38 am

Re: escalation not works

Post by niraj_vara »

Hi

Group is a typo mistake I have changed before posting .

the real local.cfg entry

define serviceescalation{
host_name localhost
service_description Root Partition
first_notification 3
last_notification 5
contact_groups admins
notification_interval 10
}

define serviceescalation{
host_name localhost
service_description Root Partition
first_notification 6
last_notification 8
contact_groups admins,escalation
notification_interval 10

}


I have added the notification_interval to 10 but still only default sms group is able to receive the trigger.

as I understand from the first sericeescalation that I have mentioned the first_notification to 3 so the after 30 minute admin group will get the trigger e-mail but
I am not able to receiving the same.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: escalation not works

Post by abrist »

Is the service check failing long enough for the 30min delayed escalation to kick in? Is nagios logging the attempt to escalate? Do any of your template have restrictive notification hours? Are your contact groups working with other alerts?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
niraj_vara
Posts: 20
Joined: Thu Dec 13, 2012 1:38 am

Re: escalation not works

Post by niraj_vara »

Hi abrist

For the all the seriveces service check interval time is 10m. I have check in the log only default group sms is receiving the alert.
template having no restrictive notification hours. its 24x7 for all the templates. contact group is working fine.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: escalation not works

Post by mguthrie »

Do you have the notification_interval value set in either the service or the template? If you had the default notification_interval of 60 minutes, the escalation notification wouldn't kick in for 3 hours after the initial notification.
niraj_vara
Posts: 20
Joined: Thu Dec 13, 2012 1:38 am

Re: escalation not works

Post by niraj_vara »

Hi

I have set the notification_interval in template.cfg and its 10 minute.


define service{
name generic-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: escalation not works

Post by gshergill »

Hi niraj_vara,

You are saying that it isn't using the escalation at all, not even in the logs?

Just to check, you mentioned before that the local.cfg is where you have defined the escalations? Have you added this .cfg to your nagios.cfg?

I think you missed the last part of the generic-service template in your post (it doesn't show the notification_interval). But the service you've mentioned uses the local-service template, make sure you aren't overriding the notification_interval there.
Also, just to confirm that you know, with an notification interval of 10 minutes, it would still take 30 minutes for the escalation to start.

When I was debugging my escalations I set the notification interval to ~2 minutes for faster results when I made changes.

Kind Regards,

Gary Shergill
niraj_vara
Posts: 20
Joined: Thu Dec 13, 2012 1:38 am

Re: escalation not works

Post by niraj_vara »

Hi

yes there is no log related to the escalation in log file.

in local.cfg I have added the following escalation defination

define serviceescalation{
host_name localhost
service_description Root Partition
first_notification 3
last_notification 5
contact_groups admins
notification_interval 10
# escalation_period 24x7
# escalation_options w,u,c,r
}

define serviceescalation{
host_name localhost
service_description Root Partition
first_notification 6
last_notification 8
contact_groups admins,escalation
notification_interval 10

}


And in template.cfg I have the following entries

define contact{
name escalate
# contact_name niraj
# alias niraj
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands nagios_sms,notify-service-by-email
host_notification_commands nagios_sms_hosts,notify-host-by-email
}

define service{
name generic-service
active_checks_enabled 1
passive_checks_enabled 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 10
retry_check_interval 2
contact_groups admins
notification_options w,u,c,r
notification_interval 10
notification_period 24x7
register 0
}




Pls check the above is anything wrong in that ??????
Locked