Page 1 of 1

multiple checks on a same service after a forced check

Posted: Thu Sep 20, 2012 4:52 am
by Parso
Hello,

I encounter a problem about services checks.

The configuration :
- Linux RHEL 6.3
- Nagios 3.4.1

The problem :
When, on a host (for example "localhost"), I check for the results of a service (for example "SSH"), the polling is
executed at the configured interval (60 seconds).
I got the "start times" :
2012-09-20 12:06:28
2012-09-20 12:07:28
2012-09-20 12:08:28
2012-09-20 12:09:28
2012-09-20 12:10:28

Then, I use an external command to force a immediate check on the SSH service of localhost :

Code: Select all

echo "[`date +%s`] SCHEDULE_FORCED_SVC_CHECK;localhost;SSH;`date +%s`" > /usr/local/nagios/var/rw/nagios.cmd
The forced check is working :
2012-09-20 12:07:28
2012-09-20 12:08:28
2012-09-20 12:09:28
2012-09-20 12:10:28
2012-09-20 12:10:49

But afterwards, Nagios keeps two checks on the SSH service :
2012-09-20 12:10:28
2012-09-20 12:10:49
2012-09-20 12:11:28
2012-09-20 12:11:49
2012-09-20 12:12:28
2012-09-20 12:12:49

And If I schedules a new forced check (SCHEDULE_FORCED_SVC_CHECK) I get one more check for the same service :
2012-09-20 12:13:28
2012-09-20 12:13:49
2012-09-20 12:14:07
2012-09-20 12:14:28
2012-09-20 12:14:49
2012-09-20 12:15:07
2012-09-20 12:15:28
2012-09-20 12:15:49

And it's possible to do it again and again to finally to get lots of checks for a single service.
The problem is that the load and the number of useless checks are increasing on the host.

Does anyone have any idea to solve this problem?

Thanks in advance for any information.

Re: multiple checks on a same service after a forced check

Posted: Thu Sep 20, 2012 6:27 pm
by jsmurphy
whoa... so a forced check will cause it to schedule regular additional checks? I can't say I've noticed or heard of that problem before but I would probably report that on the Nagios bug tracker along with any relevant details on your install that might help recreate the problem.

http://tracker.nagios.org/my_view_page.php

Re: multiple checks on a same service after a forced check

Posted: Fri Sep 21, 2012 2:54 am
by Parso
Thank you for your answer and for the information.

I reported the issue on the Nagios bug tracker : http://tracker.nagios.org/view.php?id=385

Another issue (resolved) seems to have the same root cause :
http://tracker.nagios.org/view.php?id=342

I will try to patch nagios with the new revision :
http://nagios.svn.sourceforge.net/viewv ... ision=2138

I will come back with the results.

Re: multiple checks on a same service after a forced check

Posted: Fri Sep 21, 2012 10:17 am
by Parso
Parso wrote:Thank you for your answer and for the information.

I reported the issue on the Nagios bug tracker : http://tracker.nagios.org/view.php?id=385

Another issue (resolved) seems to have the same root cause :
http://tracker.nagios.org/view.php?id=342

I will try to patch nagios with the new revision :
http://nagios.svn.sourceforge.net/viewv ... ision=2138

I will come back with the results.

Tests & results :

For each test, I launched "configure" and "make", then I replaced the current executables "nagios" and "nagiostats" by the new ones. Then I repeated the tests to reproduce the problem (as described into the initial post).

1) With nagios 3.4.1 files but modifying the events.c file according to 2138 revision.
http://nagios.svn.sourceforge.net/viewv ... threv=2138
That do not fix the bug. The behaviour remains the same as previously.

2) With nagios 2138 revision files (all files)
The problem is fixed. But it's obviously not a stable version of nagios and in addition I meet new troubles. For example, ndoutils is not working.

Does anybody have another clue to solve this problem ?