Page 1 of 1

Execution at specific times

Posted: Mon Feb 09, 2015 7:15 pm
by rajasegar
Nagios Xi 2014R1.2
check_gearman: version 1.4_nagios4 running on libgearman 0.25

We are having issues with getting nagios to execute checks at specific times.

Code: Select all

define timeperiod {
	timeperiod_name               		esb_db_pcejrln_check
	alias                         		esb_db_pcejrln_check
	monday                        		07:15-23:25
	tuesday                       		07:15-23:25
	wednesday                     		07:15-23:25
	thursday                      		07:15-23:25
	friday                        		07:15-23:25
	saturday                      		07:15-23:25
	sunday                        		07:15-23:25
	}	
The check starts at 7:15am and execute every 1 hour.
It works fine if there is no interruption etc.
However if there is, and the check gets executed at 8:07am, it starts executing from that time onwards.
Eg: 8:07, 9:07 etc.

This check is for specific file at specific times so this behavior cannot be used.
Please advice on this. How to get Nagios to stick to the original execution time schedule.

Re: Execution at specific times

Posted: Mon Feb 09, 2015 7:34 pm
by Box293
How about creating more specific time windows.

Code: Select all

define timeperiod {
   timeperiod_name                     esb_db_pcejrln_check
   alias                               esb_db_pcejrln_check
   monday                              07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   tuesday                             07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   wednesday                           07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   thursday                            07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   friday                              07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   saturday                            07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   sunday                              07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   }   

Re: Execution at specific times

Posted: Mon Feb 09, 2015 7:53 pm
by rajasegar
Box293 wrote:How about creating more specific time windows.

Code: Select all

define timeperiod {
   timeperiod_name                     esb_db_pcejrln_check
   alias                               esb_db_pcejrln_check
   monday                              07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   tuesday                             07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   wednesday                           07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   thursday                            07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   friday                              07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   saturday                            07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   sunday                              07:15-07:16,08:15-08:16,09:15-09:16,10:15-10:16,11:15-11:16,12:15-12:16,13:15-13:16,14:15-14:16,15:15-15:16,16:15-16:16,17:15-17:16,18:15-18:16,19:15-19:16,20:15-20:16,21:15-21:16,22:15-22:16,23:15-23:16
   }   
I was hoping to avoid this. Anyway thanks, will try it out.
How does the execution behave if there is a long queue during the specified execution time?

Re: Execution at specific times

Posted: Mon Feb 09, 2015 7:54 pm
by Box293
rajasegar wrote:How does the execution behave if there is a long queue during the specified execution time?
I'll need to get one of the other tech's to answer that question.

Re: Execution at specific times

Posted: Mon Feb 09, 2015 7:56 pm
by rajasegar
Box293 wrote:
rajasegar wrote:How does the execution behave if there is a long queue during the specified execution time?
I'll need to get one of the other tech's to answer that question.
BTW, I am using mod gearman.

Re: Execution at specific times

Posted: Tue Feb 10, 2015 10:22 am
by abrist
rajasegar wrote:I was hoping to avoid this. Anyway thanks, will try it out.
How does the execution behave if there is a long queue during the specified execution time?
As it normally would, which may cause checks to bit early or late depending on the queue. I do think the behavior is more pronounced in core after the last bit of changes to the scheduler.