delayed service check startup

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
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

delayed service check startup

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: delayed service check startup

Post 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.
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

Re: delayed service check startup

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: delayed service check startup

Post 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.
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.
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

Re: delayed service check startup

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: delayed service check startup

Post 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?
grimm26
Posts: 36
Joined: Wed Dec 12, 2012 1:57 pm

Re: delayed service check startup

Post 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. :oops:
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: delayed service check startup

Post 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.
Locked