Page 1 of 1
delayed service check startup
Posted: Mon Aug 12, 2013 2:03 pm
by grimm26
I have a Nagios instance with some service checks that run in 5 minute intervals and some that run in 30 minute intervals. When I first start up Nagios, it schedules the 30 minute interval checks first about 8 minutes out and then the 5 minute interval checks don't start for until after those run. So it is over 10 minutes from Nagios startup that the 5 minute interval checks start running. Why is that? Is there a way to tell Nagios to start smaller interval checks first?
Re: delayed service check startup
Posted: Mon Aug 12, 2013 2:18 pm
by slansing
Nagios automatically chronologically schedules checks though I'm not sure anything is responsible for scheduling them in a certain order if you turn Nagios off then on again. Not all checks are scheduled that far out, some should start immediately. Do you not leave Nagios running for extended periods? If you schedule checks to run immediately then they should be bumped to the front as soon as possible.
Re: delayed service check startup
Posted: Mon Aug 12, 2013 2:37 pm
by grimm26
I leave it running all the time. Maybe a couple of restarts a week as I add new stuff. I have all retained state data turned off, though, so it doesn't just resume a schedule. I was assuming that on a clean start like that it should just start right in.
Re: delayed service check startup
Posted: Mon Aug 12, 2013 4:43 pm
by abrist
It does start scheduling and running checks from a cold reboot. But, it will schedule them over a period of time so that they are balanced for the future repetition of checks.
Re: delayed service check startup
Posted: Mon Aug 12, 2013 5:10 pm
by grimm26
abrist wrote:It does start scheduling and running checks from a cold reboot. But, it will schedule them over a period of time so that they are balanced for the future repetition of checks.
Understood, but wondering why that balance starts 8 minutes into the future.
Re: delayed service check startup
Posted: Tue Aug 13, 2013 9:39 am
by slansing
Can you show us timestamps of this happening? The scheduling should be happening within the first minute. "As far as I know." Do you have a lot of crons running on the system? Any software suites other than Nagios Core running, or extra processes churning on something?
Re: delayed service check startup
Posted: Tue Aug 13, 2013 10:37 am
by grimm26
slansing wrote:Can you show us timestamps of this happening? The scheduling should be happening within the first minute. "As far as I know." Do you have a lot of crons running on the system? Any software suites other than Nagios Core running, or extra processes churning on something?
I hate to be "that guy," but looking at my archived nagios logs for the past couple of days it shows that the first service check comes in 10 seconds after "Finished daemonizing." My issue may have to do with the long running nature of my service checks I suppose.

Re: delayed service check startup
Posted: Tue Aug 13, 2013 10:43 am
by slansing
Ahh, I figured that sounded a bit odd. If your checks do take a while to come in then this would be expected. Looks like they are scheduled and coming in fine though! At least those who are expected to.