Page 2 of 2
Re: escalation not works
Posted: Mon Apr 15, 2013 7:26 am
by gshergill
Hi niraj_vara,
Your local.cfg just has the service escalations defined?
I can't see anything wrong with what you have posted... It's odd that the escalation isn't in the logs.
I literally copy and pasted your service escalation into my config file and it worked fine.
When you run the command below do any errors appear?
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
All I can recommend is to make sure the file with the escalations defined is in nagios.cfg.
Kind Regards,
Gary Shergill
Re: escalation not works
Posted: Mon Apr 15, 2013 7:39 am
by niraj_vara
Hi gary
I have run the following command and there is no error !!!
in my local.cfg I have the following three entries
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
}
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
}
when I set the root partition warning my contact group sms is able to received the trigger but its not able to reach to the serviceescalation definition.
Re: escalation not works
Posted: Mon Apr 15, 2013 8:29 am
by gshergill
Hi niraj_vara,
Does your nagios.cfg file has the following (with the appropriate path)?
Code: Select all
cfg_file=/usr/local/nagios/etc/objects/local.cfg
Can you post your local-service template? Root Partition is using local-service not generic-service.
To speed things up maybe try using lower notification/check intervals (I use 1 minute for testing).
Are you receiving all notifications to the group sms? Or where does the 3rd/4th/5th notification go?
I've just copy and pasted your local.cfg to a new file local.cfg on my system. I added it to nagios.cfg and changed the contact_groups to some new test ones I created.
I changed all notification and check_intervals to 1 minute and everything worked fine (both escalations were initiated).
So there's definitely nothing wrong with the configurations you have just posted, the problem lies elsewhere.
Kind Regards,
Gary Shergill
Re: escalation not works
Posted: Mon Apr 15, 2013 4:57 pm
by scottwilkerson
Again, as gshergill asked:
gshergill wrote: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?
Re: escalation not works
Posted: Tue Apr 16, 2013 6:23 am
by niraj_vara
Hi Gary
Thnks for your help. I have tried the same with configuration and notification/check intervals changed to 2 minute .
Now its working fine.
Re: escalation not works
Posted: Tue Apr 16, 2013 4:02 pm
by sreinhardt
Great! Are you all set then niraj_vara?
Re: escalation not works
Posted: Wed Apr 17, 2013 12:15 am
by niraj_vara
Hi Srein
In nagios I had installed 8 live servers long time ago. and it was working the perfectly with e-mail and sms triggered.
Recently I was just trying for the escalation and in that I had issue. but now its working fine.
thnks you all for help and guidance.