nagios startup script patch
Andreas Ericsson
ae at op5.se
Tue Mar 8 13:21:45 CET 2011
On 03/08/2011 12:24 PM, SCHAER Frederic wrote:
>> -----Message d'origine-----
>> De : Andreas Ericsson [mailto:ae at op5.se]
>> Envoyé : mardi 8 mars 2011 11:43
>> À : Nagios Developers List
>> Cc : SCHAER Frederic
>> Objet : Re: [Nagios-devel] nagios startup script patch
>>
>> On 03/08/2011 11:21 AM, SCHAER Frederic wrote:
>>> Hi,
>>>
>>> Yes, I'm aware of that, thanks.
>>> As I said, patch is minimalistic, it does not implement anything, it
> just
>>> intends to optimize the startup script...
>>> Actually, the reason I looked at the startup script was to see how this
>>> faststartup was handled at the init level... and it is not.
>>>
>>> Also, I'm not interested in objects cache : when I usually reload config
> (I
>>> am/was avoiding restarts), it's because the config changed...
>>>
>>> So, what this patch does is actually take advantage of the building
>>> optimizations, and avoid the useless duplication of checks.
>>> If you look at the current init script, a restart *really* checks twice
> the
>>> configuration using "nagios -v", and it furthermore doesn't de-activate
>>> circular path checks when starting nagios. This is 3 tests for circular
>>> dependencies. And 2 for a simple server start using the init script.
>>>
>>> Since circular path checks are what seem to take most of the startup
> time, I
>>> thought it might be good to take advantage of this built-in
> optimizations at
>>> startup... ?
>>>
>>
>> It is, but there's really no reason circular path checks should take such
>> a huge amount of time. When I get git-svn set up properly I'll have to
>> look into that. The patch for circular host<->parents paths by Jean Gabès
>> should be re-usable for host and service dependencies as well, and that
>> provided a monumental speedup for the area it touched. What version of
>> Nagios are you using, and roughly how many hosts and service
>> dependencies?
>>
>
> Hi Andreas,
>
> I did compile and run the patch on latest stable tarball, under on
> RHEL/Scientific Linux, i.e release 3.2.3.
> We have 17842 services spread on 915 hosts, and.... 33165 dependencies.
> The hosts hierarchy is not great (only 2 levels), but we are using nrpe for
> most remote services, and as a consequence we setup a dependency on the nrpe
> daemon for every nrpe check (notification + execution dependency).
>
Ah. Hmm.. I take it each dependency chain is only one level deep then.
I wonder what the profile is of verifying that configuration. I'll have
to generate a similar configuration and see where the time is spent.
> I actually tried to find the famous patch in mailing lists archives before I
> sent this mail to the dev list... but did not find it ;)
>
You'll find all the info here.
http://git.op5.org/git/?p=nagios.git;a=commit;h=a6e06d8de24ffcb4a8c341a60098042dc3284756
I doubt that patch is applicable for this case though, since it
helps mostly with configurations that are several layers deep
and I assume the service dependency chain is mostly 1 level only.
As such, I fear this can only be remedied by remodeling the
service and service dependency objects which we can't do without
bumping the major version.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
More information about the Developers
mailing list