cfg_dir recursive?

Tom Throckmorton throck at gmail.com
Sat May 3 23:20:15 CEST 2008


On 5/3/08 4:25 PM, local.coder wrote:
> Jo Rhett wrote:
>> I'm using FreeBSD 6.2-REL.  There's nothing about FreeBSD that would  
>> prevent recursion in subdirectories.

Conversely, I don't _think_ there's anything about the recursion code 
that is OS-specific.  Then again, I've only ever run it on Linux.  Have 
a look in xdata/xodtemplate.c:258 if you want to the relevant code.

> Using the current 3.x I am using recursion on FreeBsd 6.2 and have no 
> issues.  Please make sure your config files have a .cfg extension as the 
> config file directs. I have been using recursion since before 3.0 
> without issues. I even double checked on sub dirs and that read 
> correctly as well.

Ditto.  I'm running Nagios 2.x on RHEL3/4/5, and cfg_dir recursion works 
with empty subdirs just fine, e.g.:

cfg_dir=/etc/nagios/servers <- an empty dir, with multiple subdirs 
beneath that contain multiple files w/ .cfg extensions.  Works even if 
that dir does contain .cfg files.

> Short of the .cfg extension not being on your files I would have to look 
> at file perms next.

Well, since Jo said it works when pointing explictly to the subdirs (and 
verified the dir perms), I don't think either of these is the problem.

Jo, could you cut and paste your relevant configuration bits for 
enabling the cfg_dir / cfg_file directives?

-tt

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone




More information about the Developers mailing list