<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Bookman Old Style";
        panose-1:2 5 6 4 5 5 5 2 2 4;}
@font-face
        {font-family:"Baskerville Old Face";
        panose-1:2 2 6 2 8 5 5 2 3 3;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Bookman Old Style","serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Bookman Old Style","serif"">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Bookman Old Style","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Bookman Old Style","serif"">I’m very new to Nagios. 
</span><span lang="EN-GB" style="font-size:10.0pt;
font-family:"Bookman Old Style","serif"">I'm running version Nagios 3.0.6 on CentOS RHEL 5.1. I used the FC6 instructions for my installation.  I’ve successfully installed the program per the Quick-start guide
 provided on the Website.  We presently have another server with an older version of Nagios installed.  It’s using “cfg_dir=/opt/nagios/etc” as its location for all *.cfg giles.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Bookman Old Style","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Bookman Old Style","serif"">Here's a problem: When I try to create an alternate directory (cfg_dir) in the nagios config file, I keep getting a CONFIG ERROR when I try to restart the
 service. I would like to use “cfg_dir=/opt/nagios/etc/main” to hold all the config files. Here is a list of that directory right now:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Bookman Old Style","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><code><span lang="EN-GB" style="font-size:10.0pt">[root@ ~ main]# ls -l</span></code><span lang="EN-GB" style="font-size:10.0pt;font-family:
"Courier New""><br>
<code>total 68</code><br>
<code>-rwxrwxr-x 1 nagios nagios  7714 Feb 13 16:55 commands.cfg</code><br>
<code>-rwxrwxr-x 1 nagios nagios  2166 Feb 13 16:52 contacts.cfg</code><br>
<code>-rwxrwxr-x 1 nagios nagios   240 Feb 13 14:28 hostgroups.cfg</code><br>
<code>-rwxrwxr-x 1 nagios nagios   163 Feb 13 16:51 hosts.cfg</code><br>
<code>-rwxrwxr-x 1 nagios nagios  2414 Feb 13 16:39 services.cfg</code><br>
<code>-rwxrwxr-x 1 nagios nagios 10812 Feb 13 16:41 templates.cfg</code><br>
<code>-rwxrwxr-x 1 nagios nagios  3209 Feb 13 16:55 timeperiods.cfg</code><br>
<code>[root@ ~ main]# service nagios restart</code><br>
<code>Running configuration check... CONFIG ERROR!  Restart aborted.  Check your Nagios configuration.<o:p></o:p></code></span></p>
<p class="MsoNormal"><code><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></code></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Bookman Old Style","serif"">I've hashed out all the other cfg in nagios.cfg to only use this directory.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Bookman Old Style","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">[root@ ~ main]# grep cfg_ /usr/local/nagios/etc/nagios.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/usr/local/nagios/etc/objects/commands.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/usr/local/nagios/etc/objects/contacts.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/usr/local/nagios/etc/objects/templates.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/opt/nagios/etc/commands.cfg</span><span lang="EN-GB" style="font-size:
10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/opt/nagios/etc/contacts.cfg</span><span lang="EN-GB" style="font-size:
10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/opt/nagios/etc/timeperiods.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/opt/nagios/etc/templates.cfg</span><span lang="EN-GB" style="font-size:
10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># cfg_file=/usr/local/nagios/etc/objects/localhost.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">cfg_dir=/opt/nagios/etc/main</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">#cfg_file=/usr/local/nagios/etc/objects/windows.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">#cfg_file=/usr/local/nagios/etc/objects/switch.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">#cfg_file=/usr/local/nagios/etc/objects/printer.cfg</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># extension) in a particular directory by using the cfg_dir</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">#cfg_dir=/usr/local/nagios/etc/servers</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">#cfg_dir=/usr/local/nagios/etc/printers</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">#cfg_dir=/usr/local/nagios/etc/switches</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">#cfg_dir=/usr/local/nagios/etc/routers</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><br>
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""># object configuration files (see the cfg_file and cfg_dir options above).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Book Antiqua","serif"">Please help!  Thanks.
</span><span lang="EN-GB" style="font-size:7.5pt;font-family:"Book Antiqua","serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Bookman Old Style","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><i><span style="font-family:"Baskerville Old Face","serif"">Eric Chatham<o:p></o:p></span></i></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">CONFIDENTIAL. This e-mail and any attached files are confidential and should be destroyed and/or returned if you are not the intended and proper recipient.<br>
</font>
</body>
</html>