[Nagios-devel] Re: cfg_dir and hidden directories

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
Guest

[Nagios-devel] Re: cfg_dir and hidden directories

Post by Guest »

Holger Weiss writes:

> * Mark Plaksin [2006-04-19 07:53]:
>
>> a change between 2.0b4 and 2.1 is causing Nagios' cfg_dir processing to
>> recurse into hidden directories. It *looks* like the problem is in the
>> diff between version 1.99 and version 1.100 of xdata/xodtemplate.c but I
>> can't put my finger on the exact cause.
>
> Are you _sure_ you see the duplicate definitions due to Nagios recursing
> into hidden subdirectories? I cannot reproduce this with Nagios 2.1/2.2
> and from reading the code, I don't see how the check for hidden
> directories in xdata/xodtemplate.c:430 could fail.
>
> If you're running Nagios on Linux, could you check the output of "strace
> nagios -v /path/to/nagios.cfg" and see whether Nagios really open(2)s a
> file within a hidden directory?

You're right. We're just insane. We did the strace before posting but
didn't notice that it never opens anything from .svn directories. We were
fooled because it does stat the .svn dirs.

The actual problem seems crazy. We have had a "name" directive in many of
our service definitions ever since we started running Nagios. Looking back
at the 1.3 (and 2.1) docs, I can't see where we came up with that. We add
nearly every service to Nagios via a script so they all have it.

Anyhow, we used the same name for the same service for multiple hosts. So
the load average service check for each host had:
name load

in it. So Nagios said it was duplicated. We deleted all of these name
lines and all is well. Sorry for the noise!






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked