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

EXT-Fuentes, James P James.P.Fuentes at boeing.com
Mon May 16 19:51:42 CEST 2005


Do you have "cfg_file" directives for each hostname.file in your nagios.cfg? Also, I'm a little confused on why you'd point to "cfg_dir=/usr/local/nagios/etc/hosts". That should read cfg_file=/usr/local/nagios/etc/hosts.cfg but it sounds like you don't want that in favor of several other hostname.cfgs:
 
cfg_file=/usr/local/nagios/etc/host1.cfg
cfg_file=/usr/local/nagios/etc/host2.cfg
 
-Jim

________________________________

From: Steve_Schryburt at Mitel.COM [mailto:Steve_Schryburt at Mitel.COM]
Sent: Mon 5/16/2005 10:12 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Error: Cannot open config file '/usr/local/nagios/etc/hosts.cfg'



I'm trying to use several host definition files, one for each monitored
system.  I'm not using hosts.cfg.

When I try staring the nagios deamon I get an error that it can't find
hosts.cfg:

Nagios 2.0b3 starting... (PID=425)
Error: Cannot open config file '/usr/local/nagios/etc/hosts.cfg' for
reading: No such file or directory


Location of of host definition files (1 per host):
/usr/local/nagios/etc/hosts/<hostname>.cfg

/usr/local/nagios/etc/nagios.cfg:
cfg_dir=/usr/local/nagios/etc/hosts


I compiled with these options:

./configure --prefix=/usr/local/nagios \
--exec-prefix=/usr/local/nagios \
--bindir=/bin \
--sbindir=/sbin \
--libexecdir=/libexec \
--datadir=/share \
--sysconfdir=/etc \
--localstatedir=/var


Thanks.
Stephen S.




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
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




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
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