> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Cipriani, Robert C > Sent: Thursday, December 27, 2007 3:42 PM > To: 'nagios-users@lists.sourceforge.net' > Subject: Re: [Nagios-users] CFG_DIR recursive feature.. > > > -----Original Message----- > > From: Chris Haulmark [mailto:[EMAIL PROTECTED] > > Sent: Thursday, December 27, 2007 11:26 AM > > To: Cipriani, Robert C; nagios-users@lists.sourceforge.net > > Subject: RE: [Nagios-users] CFG_DIR recursive feature.. > > > > > > > > > > > > > -----Original Message----- > > > > From: Chris Haulmark [mailto:[EMAIL PROTECTED] > > > > Sent: Thursday, December 27, 2007 10:57 AM > > > > To: Cipriani, Robert C; nagios-users@lists.sourceforge.net > > > > Subject: RE: [Nagios-users] CFG_DIR recursive feature.. > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Chris Haulmark [mailto:[EMAIL PROTECTED] > > > > > > Sent: Wednesday, December 26, 2007 5:44 PM > > > > > > To: Cipriani, Robert C; nagios-users@lists.sourceforge.net > > > > > > Subject: RE: [Nagios-users] CFG_DIR recursive feature.. > > > > > > > > > > > > > > > > > > > > > > > > Yep. > > > > > > > > > > > > > > > > > > I could see that it did not include the deeper config > > > files. > > > > > > > > > > > > > > > > Excuse me: > > > > > > > > > > > > > > > > I'm using nagios-3.0.b7 on FreeBSD 6.2. > > > > > > > > > > > > > > > > Here are the sample lines that I pasted from the nagios.cfg. > > > > > > > > > > > > > > > > cfg_dir=svchosts.FBSD03/ > > > > > > > > cfg_dir=svchosts.FBSD03/clients > > > > > > > > cfg_dir=svchosts.FBSD03/servers > > > > > > > > cfg_dir=svchosts.FBSD03/networks > > > > > > > > > > > > > > > > I commented out the last 3 lines and did nagios -v on the > > > > > > nagios.cfg. > > > > > > > > > > > > > > > > It errors with no hosts and services defined. > > > > > > > > > > > > > > > > When I removed the comments from those last 3 lines and > > redid > > > > the > > > > > > > > nagios -v on the nagios.cfg....it did not error. > > > > > > > > > > > > > > > > Chris > > > > > > > > > > > > [...snip....] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hmm...maybe try dropping the trailing slash? I know this > > worked > > > > for > > > > > me > > > > > > > on 3.0.b6. I'm setting up 3.0.rc1 on a new box now, will test. > > > > > > > > > > > > > > > > > > > > > > > > > > I tried either: > > > > > > > > > > > > cfg_dir=svchosts.FBSD03 > > > > > > cfg_dir=/usr/local/etc/nagios/svchosts.FBSD03 > > > > > > > > > > > > Both were still giving errors as long as the last 3 lines, that > > I > > > > > > mentioned > > > > > > in my previous email, were commented out. > > > > > > > > > > > > Chris > > > > > > > > > > > > > > > > > > > > > > > > > > > > Chris, > > > > > > > > > > Any luck yet? It works for me with 3.0rc1. Maybe try without the > > . > > > > > character (a long shot...I haven't looked at the source > > code...that > > > > > shouldn't cause a problem but it's worth a try). > > > > > > > > > > > > > > > > > > No luck. I tried to change the . to - (dash): > > > > > > > > ### NAGIOS2 ### > > > > > > > > cfg_dir=svchosts-NAGIOS2/ > > > > #cfg_dir=svchosts-NAGIOS2/clients > > > > #cfg_dir=svchosts-NAGIOS2/servers > > > > #cfg_dir=svchosts-NAGIOS2/networks > > > > > > > > I also upgraded nagios-devel to RC1. It has failed. > > > > > > > > I could not enable the debugging level to show the startup > > > > stats when the config files are getting loaded. > > > > > > > > I got someone else to look thru the source for me. > > > > > > > > Any new insights are welcome. > > > > > > > > Chris > > > > > > > > > > > > > > > > > > > Robert C. Cipriani > > > > > Senior Network Administrator > > > > > Tampa Bay Division IT > > > > > Bright House Networks > > > > > W: (727) 329-2000 x74264 > > > > > M: (727) 365-1231 > > > > > > > > > > > > > > > > > > > > CONFIDENTIALITY NOTICE: This e-mail may contain information that > > is > > > > > privileged, confidential or otherwise protected from disclosure. > > If > > > > you > > > > > are not the intended recipient of this e-mail, please notify the > > > > sender > > > > > immediately by return e-mail, purge it and do not disseminate or > > > copy > > > > > it. > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > -- > > > > > -- > > > > > This SF.net email is sponsored by: Microsoft > > > > > Defy all challenges. Microsoft(R) Visual Studio 2005. > > > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > _______________________________________________ > > > > > Nagios-users mailing list > > > > > Nagios-users@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 > > > > > > > > > Try an absolute path. > > > This is mine: > > > > > > cfg_dir=/usr/local/nagios/etc/hosts > > > cfg_dir=/usr/local/nagios/etc/printers > > > cfg_dir=/usr/local/nagios/etc/switches > > > cfg_dir=/usr/local/nagios/etc/routers > > > cfg_dir=/usr/local/nagios/etc/hostgroups > > > cfg_dir=/usr/local/nagios/etc/services > > > cfg_dir=/usr/local/nagios/etc/servicegroups > > > cfg_dir=/usr/local/nagios/etc/hostdependencies > > > cfg_dir=/usr/local/nagios/etc/servicedependencies > > > cfg_dir=/usr/local/nagios/etc/contacts > > > cfg_dir=/usr/local/nagios/etc/contactgroups > > > cfg_dir=/usr/local/nagios/etc/timeperiods > > > cfg_dir=/usr/local/nagios/etc/commands > > > > > > > This is the first thing I did when I noticed this problem. > > > > I noticed that you may not have a directory containing the cfg files > > in those listed directories? They look like default paths? > > > > My actual directories are: > > > > /usr/local/etc/nagios/svchosts-NAGIOS2/clients
> > /usr/local/etc/nagios/svchosts-NAGIOS2/servers > > /usr/local/etc/nagios/svchosts-NAGIOS2/networks > > > > There are cfg files in each of those directories relevant to > > its purposes. > > > > In the nagios.cfg, I have those lines: > > > > cfg_dir=svchosts.FBSD02/ > > #cfg_dir=svchosts.FBSD02/clients > > #cfg_dir=svchosts.FBSD02/servers > > #cfg_dir=svchosts.FBSD02/networks > > > > Testings were done to make sure the . (period) was not the culprit. > > I tried dashes and without any special characters. I used absolute > > paths too. > > > > Nagios always failed with no services or hosts found. Those services > > and hosts .cfg files are in those three directories. If I removed > > the comments from those three cfg_dir lines, nagios would start up > > successfully. > > > > It is apparent that you are running Linux because of the different etc > > path compared to FreeBSD's. It is not supposed to be relevant to this > > situation. > > > > Right now, I am using nagios-devel RC1 on FreeBSD 6.2. There are two > > different slaves that are using either svchosts.FBSD02 and > > svchosts.FBSD03. I had hoped to use the master which would load both > > svchosts.FBSD01, svchosts.FBSD02, and svchosts.FBSD03. > > > > It would have been easy to use three of cfg_dir lines instead of several > > for each directories inside those primary directories. > > > > Chris > > > > My mistake...I got what you were trying to do backwards. Let me test with > just the etc subdirectory to see if it works for me. > > > I should point out that the directories I have listed above have their own subdirectories (for example, /usr/local/nagios/etc/services contains a templates subdirectory). Any configs within these are recursively processed normally. Robert C. Cipriani CONFIDENTIALITY NOTICE: This e-mail may contain information that is privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient of this e-mail, please notify the sender immediately by return e-mail, purge it and do not disseminate or copy it. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nagios-users mailing list Nagios-users@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