Unpredictable service check times fixed?
Stanley Hopcroft
Stanley.Hopcroft at IPAustralia.Gov.AU
Sun Apr 13 07:20:12 CEST 2003
Dear Sir,
I am writing to thank you for your letter and say,
0 If you are not using Nagios-1.0 then please try that, otherwise
1 You may have found a bug as you say in the scheduler.
However, there are _many_ Nag installations monitoring far more hosts
and services without problems. (Here ~ 200 hosts and 350 services).
If that is the case, the only way you can demonstrate the bug is by
setting up a Test Nag environment - it could be your production
environment since that is exhibiting the problem - and run Nagios in
such a way that you can collect debug information.
This is probably easiest done by rebuilding Nag with the appropriate
debug config option
(./configure --help
..
--enable-DEBUG0 shows function entry and exit
--enable-DEBUG1 shows general info messages
--enable-DEBUG2 shows warning messages
--enable-DEBUG3 shows scheduled events (service and host checks... etc)
--enable-DEBUG4 shows service and host notifications
--enable-DEBUG5 shows SQL queries
so probably DEBUG3)
then run Nag in foreground (no -d) and post the parts of the log that
show scheduling anomalies.
Alternatively, modify the plugin of the service that seems to be
suffering the most severe scheduling delays to log it's invocation and
exit.
This probably means adding code like (to a C plugin)
+time_t my_clock;
+clock = time() ;
+fprintf(stderr, "myPlugin started at %s." ctime(&clock)) ;
...
+clock = time() ;
+fprintf(stderr, "myPlugin finished at %s.", ctime(&clock)) ;
recompiling it and installing it - probably under a new name - in the
Nag libexec directory.
2 If you want a tactical dumpb solution, a cron job that sends a hangup
signal to Nagios periodically (or restarts it).
You probably want to post the relevant parts of nagios.cfg also.
Yours sincerely.
--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------
'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'
from Meditation 17, J Donne.
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list