error when including resource.cfg
Andrew Edwards
aedwards at sandvine.com
Fri Jun 6 06:21:08 CEST 2008
I have in my nagios.cfg
cfg_dir=/usr/local/etc/nagios/objects/common
cfg_dir=/usr/local/etc/nagios/objects/mfg
but I do not include any parent dir's only these. I then tried copying
the resource.cfg file into the commond dir and I get the same problem.
Are there caviates to using the cfg_dir directive? I used to have
relatively large config files (80-100k) and I've found it very usefull
to break these up into many smaller files and I could include these one
by one but it's very handy to use the cfg_dir. I do need my $USERx$
macros's so how can I work-around this problem?
-----Original Message-----
From: Morris, Patrick [mailto:patrick.morris at hp.com]
Sent: Thursday, June 05, 2008 12:17 AM
To: Andrew Edwards; Thomas Guyot-Sionnest
Cc: Nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] error when including resource.cfg
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Andrew Edwards
> Sent: Wednesday, June 04, 2008 7:32 PM
> To: Thomas Guyot-Sionnest
> Cc: Nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] error when including resource.cfg
>
> I get the same result if I use the resource.cfg-sample provide with
the
> install.
>
> $ nagios -v /usr/local/etc/nagios/nagios.cfg
>
> Nagios 3.0.2
> Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
> Last Modified: 05-19-2008
> License: GPL
>
> Reading configuration data...
>
> Error: Unexpected token or statement in file
> '/usr/local/etc/nagios/resource.cfg' on line 26.
Have you, by any chance, told Nagios to load all files in
/usr/local/etc/nagios using the cfg_dir directive, or told it to load it
using the cfg_file directive rather than the resource_file one? That
would cause the error you're seeing.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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