cfg_dir recursion not working

Dr. Dave Blunt dblunt at itgroundwork.com
Thu Jul 14 18:16:41 CEST 2005


Indeed the files I want to include are all
/usr/local/nagios/etc/rps/*/*.cfg.  There are other files in those subdirs
such as tar.gz files.

It's SuSE ES 9 and /usr/include/dirent.h is present.  :(


Andreas Ericsson wrote:
> I have an install with a number of Nagios configs files stored under
> subdirectories:
> 
> /usr/local/nagios/etc/rps/<dir1>/acfgfile
> /usr/local/nagios/etc/rps/<dir2>/anothercfgfile
> /usr/local/nagios/etc/rps/<dir3>/yetanothercfgfile
> .
> .

I suppose the files all match the glob(3) pattern
/usr/local/nagios/etc/rps/*/*.cfg
Otherwise, that's possibly the issue right there.

> .
> 
> There are no valid cfg files in /usr/local/nagios/etc/rps.  All services
and
> hosts are defined in the cfg files under <dir1>, <dir2>, <dir3> etc.
> 
> When I define:
> 
>   cfg_dir=/usr/local/nagios/etc/rps
> 
> in nagios.cfg the preflight check comes back with errors saying it can't
> find any hosts or services.
> 


Are you running this on a Solaris or AIX platform? I think recursion 
only works on system that has the <dirent.h> header file, and that one 
isn't present on all unices.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click




More information about the Developers mailing list