Error: Cannot open config file '/usr/local/nagios/etc/hosts.cfg'

Dan Davis hokie99cpe at gmail.com
Mon May 16 21:09:55 CEST 2005


> 
> My understanding is that I should be able to put hostname.cfg files into a
> directory that I've identified with the cfg_dir directive
> "cfg_dir=/usr/local/nagios/etc/hosts".


Correct. I do the same, but for entire sites in individual files. 

Here is the example in nagios.cfg:
> 
> # 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/servers
> #cfg_dir=/usr/local/nagios/etc/printers
> #cfg_dir=/usr/local/nagios/etc/switches
> #cfg_dir=/usr/local/nagios/etc/routers


Remove the '#' from the beginning of the 'cfg_dir' lines... 

As to the error about the 'cfg_file=/usr/local/nagios/etc/hosts.cfg' line, 
make sure that no such line actually exists in your nagios.cfg file. It it 
does, either remove it or put a '#' at the beginning of the line.

-Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050516/bdf47358/attachment.html>


More information about the Users mailing list