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. $ cat resource.cfg ######################################################################## ### # # RESOURCE.CFG - Sample Resource File for Nagios 3.0.2 # # Last Modified: 09-10-2003 # # You can define $USERx$ macros in this file, which can in turn be used # in command definitions in your host config file(s). $USERx$ macros are # useful for storing sensitive information such as usernames, passwords, # etc. They are also handy for specifying the path to plugins and # event handlers - if you decide to move the plugins or event handlers to # a different directory in the future, you can just update one or two # $USERx$ macros, instead of modifying a lot of command definitions. # # The CGIs will not attempt to read the contents of resource files, so # you can set restrictive permissions (600 or 660) on them. # # Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$) # # Resource files may also be used to store configuration directives for # external data sources like MySQL... # ######################################################################## ### # Sets $USER1$ to be the path to the plugins $USER1$=/usr/local/libexec/nagios # Sets $USER2$ to be the path to event handlers #$USER2$=/usr/local/libexec/nagios/eventhandlers # Store some usernames and passwords (hidden from the CGIs) #$USER3$=someuser #$USER4$=somepassword -----Original Message----- From: Thomas Guyot-Sionnest [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 10:27 PM To: Andrew Edwards Cc: [email protected] Subject: Re: [Nagios-users] error when including resource.cfg -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/06/08 08:08 PM, Andrew Edwards wrote: > I have been recently working on upgrading my nagios1.0 install to 3.0.2 > and whenever I have my resources.cfg file included in the nagios.cfg > file I get > Error: Unexpected token or statement in file > '/usr/local/etc/nagios/resource.cfg' on line 37. > > and line 37 is where I define $USER1$ is defined and I get this error on > every $USERx$ that is defined. I'm installing on freebsd7 from ports > and the only thing I found searching online is a reference to a > minimal.cfg but I don't know how to tell if that's my problem. I suggest you look for typos, misspelled macros, leading and trailing spaces in there... Otherwise make a copy of it with non-sensitive data, verify it still breaks and send it over (as attachment) for inspection. Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIR0736dZ+Kt5BchYRAqWZAJ98ei+VzANd+hCv2GuhAHcMUprCyQCg4rWM TPo+slv27JG5LhMyHoiVaYg= =Dlsz -----END PGP SIGNATURE----- ------------------------------------------------------------------------- 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 [email protected] 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
