cfg_dir recursive?

local.coder code at novageeks.org
Sat May 3 22:25:47 CEST 2008


Jo Rhett wrote:
> On May 3, 2008, at 11:13 AM, Anthony Montibello wrote:
>   
>> Recursive Has been around for years, I was using it on version 1.2
>> currently I am using it with Nagios  3.0a1
>>     
>
> Given that you used Recursive as a noun, is this an option that needs  
> to be enabled?
>
>   
>> I have the following line in my nagios.cfg
>>  cfg_dir=/usr/local/nagios/etc/servers
>>
>> in this directory I have up to 3 directories deep with some non cfg  
>> files as
>> well as some empty directories and it is getting everything it should.
>>
>> Could the problem be  Permissions not allowing the nagios user?
>> or could the problem correlate to the verion of Linux/Unix you are  
>> running?
>>     
>
> If it was permissions then it wouldn't read the subdirs just fine  
> when I specified them explicitly.  And no, the directories are all 755.
>
> I'm using FreeBSD 6.2-REL.  There's nothing about FreeBSD that would  
> prevent recursion in subdirectories.
>
>   
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.

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

# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:

cfg_dir=/usr/local/nagios/etc/switches
cfg_dir=/usr/local/nagios/etc/routers

Derrick

-------------------------------------------------------------------------
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