configuration directory and file directives ... perplexity (long and boring). [SEC=UNCLASSIFIED]
Andreas Ericsson
ae at op5.se
Thu Oct 25 10:05:34 CEST 2007
Stanley.Hopcroft at Dest.gov.au wrote:
>
> Here is the problem, adding a cfg_dir to point to a _Unix_ directory
> like so
>
> ***************
> *** 78,83 ****
> --- 78,87 ----
> # extension) in a particular directory by using the cfg_dir
> # directive as shown below:
>
> + cfg_dir=/etc/nagios
> +
> + # cfg_dir=/mnt/dest_smb/coms/NMS/nagios
> +
> #cfg_dir=/etc/nagios/servers
> #cfg_dir=/etc/nagios/printers
> #cfg_dir=/etc/nagios/switches
> [root at acisp057 nagios]#
>
Try if http://oss.op5.se/nagios/getnagioscfg.c lists the file you expect
it to and then get back to me. I think the current cfg_dir handling code
is conditional to having (struct dirent *)->d_type on your system, so
perhaps that's the issue. It should work equally well with just plain old
stat() instead, and would be much more portable. Performance issues can
probably be ignored, since most users don't have >50k config files.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list