nagios does not read .cfg files
Jared Brick
jared.brick at convergia.net
Thu Mar 25 23:45:18 CET 2004
I have the same problem, but the cfg_dir gives the same results. The odd
thing is that if I move hosts.cfg file (which does have the hosts
definitions) to a different directory and then touch a new hosts.cfg
file I get an error saying it can't expand the hostgroups in the
hostgroup.cfg file. I installed nagios from rpm.
hosts.cfg sample:
define host{
host_name mon01
use generic-host
alias mon Server 1
address 192.168.10.1
check_command check-host-alive
max_check_attempts 1
notification_interval 120
notification_period 24x7
notification_options d,u,r
register 0
parents fut01
}
nagios -v nagios.cfg
Nagios 1.2
Copyright (c) 1999-2004 Ethan Galstad (nagios at nagios.org)
Last Modified: 02-02-2004
License: GPL
Reading configuration data...
Running pre-flight check on configuration data...
Checking services...
Error: Host 'sa01' specified in service 'PING' not defined anywhere!
Error: Host 'sa02' specified in service 'PING' not defined anywhere!
Error: Host 'fa1A' specified in service 'PING' not defined anywhere!
Error: Host 'fa1B' specified in service 'PING' not defined anywhere!
Error: Host 'fa2A' specified in service 'PING' not defined anywhere!
Error: Host 'fa2B' specified in service 'PING' not defined anywhere!
Error: Host 'fa3A' specified in service 'PING' not defined anywhere!
Error: Host 'fa3B' specified in service 'PING' not defined anywhere!
Error: Host 'fa4A' specified in service 'PING' not defined anywhere!
Error: Host 'fa4B' specified in service 'PING' not defined anywhere!
Error: Host 'mon01' specified in service 'PING' not defined anywhere!
Error: Host 'mon02' specified in service 'PING' not defined anywhere!
Error: Host 'fut01' specified in service 'PING' not defined anywhere!
Checked 13 services.
Checking hosts...
Error: There are no hosts defined!
Checked 0 hosts.
Checking host groups...
Error: Host 'mon01' specified in host group 'servers' is not defined
anywhere!
Error: Host 'mon02' specified in host group 'servers' is not defined
anywhere!
Error: Host 'sa01' specified in host group 'systems' is not defined
anywhere!
Error: Host 'sa02' specified in host group 'systems' is not defined
anywhere!
Error: Host 'fa1A' specified in host group 'systems' is not defined
anywhere!
Error: Host 'fa1B' specified in host group 'systems' is not defined
anywhere!
Error: Host 'fa2A' specified in host group 'systems' is not defined
anywhere!
Error: Host 'fa2B' specified in host group 'systems' is not defined
anywhere!
Error: Host 'fa3A' specified in host group 'systems' is not defined
anywhere!
Error: Host 'fa3B' specified in host group 'systems' is not defined
anywhere!
Error: Host 'fa4A' specified in host group 'systems' is not defined
anywhere!
Error: Host 'fa4B' specified in host group 'systems' is not defined
anywhere!
Checked 2 host groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 2 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking host group escalations...
Checked 0 host group escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 22 commands.
Checking time periods...
Checked 4 time periods.
Checking for circular paths between hosts...
Checking for circular service execution dependencies...
Checking global event handlers...
Checking obsessive compulsive service processor command...
Checking misc settings...
Total Warnings: 0
Total Errors: 26
***> One or more problems was encountered while running the pre-flight
check...
> You could change the cfg_file definitions in nagios.cfg or use the
> cfg_dir command to point at the directory with your config files in them
> e.g.
>
> cfg_dir=/usr/local/nagios/etc
>
> Jim Mozley
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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