Very slow startup of Nagios when using NDO

Jim Avery jim at jimavery.me.uk
Wed Mar 19 17:30:43 CET 2008


On 27/02/2008, Masopust, Christian <christian.masopust at siemens.com> wrote:
> my Nagios server's startup with activated NDO is very slow (appr. 2-3
> minutes)!
>
> anyone else seeing this behaviour? possibility to speed it up (besides
> deactivating NDO :-))

Yes.  In earlier versions I think there was a problem with a
wrong/missing index on at least one of the tables.  When the ndo
daemon starts, it attempts to delete old records from the table and
this delete takes ages.  If you monitor your sql database while Nagios
is starting, you can probably see the relevant sql running (I used
phpMyAdmin for this).  I got around the problem by configuring ndo
only to store a tiny amount of information like so (in ndo2db.cfg).

# Keep timed events for 24 hours
max_timedevents_age=1440

# Keep system commands for 1 week
max_systemcommands_age=10080

# Keep service checks for 1 days
max_servicechecks_age=1440

# Keep host checks for 1 week
max_hostchecks_age=10080

# Keep event handlers for 31 days
max_eventhandlers_age=44640


I've also found it doesn't seem to matter (to me, your experience may
be different) if I terminate the offending SQL session in MySQL to
allow ndo to start more quickly.  Typically I only resort to doing
this if I've had ndo disabled for a while then start it up - it then
has more deletions than usual to wade through.

As Patrick said, I think the index is fixed in later versions of ndo.
If you're stuck with an earlier version I guess it should be fairly
easy to identify where an index would help and add one yourself.  I'm
sorry I can't remember precisely which the problemmatic table was.

hth,

Jim

-- 
Web Admin for Corsham Diary http://corshamdiary.org.uk

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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