cfg_dir and hidden directories

Mark Plaksin happy at usg.edu
Wed Apr 19 16:12:46 CEST 2006


Holger Weiss <holger at CIS.FU-Berlin.DE> writes:

> * Mark Plaksin <happy at usg.edu> [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!



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list