<html>
<head>
</head>
<body>
The nagios daemon doesn't have any hardcoded paths (you start it with 1 argument,
the location of the nagios.cfg file).  However, the CGI's do use a hardcoded
path (look in common/locations.h) for where to find the cgi.cfg. <br>
<br>
For multiple instances of CGI's, you can either re-configure and remake every
time, or use a patch that I made and sent out to the list previously.  It
takes advantage of environment variables you can set in the httpd.conf for
each set/location of CGI's.<br>
<br>
If anyone wants, I can go back and repost the email I wrote and the patch.<br>
<br>
-Russell<br>
<br>
Louie Cagasan wrote:<br>
<blockquote type="cite" cite="mid:1034298823.5419.7.camel@expedient.skycablenet.com">
  <pre wrap="">Jim,<br><br>I've checked all the cfg files and there isn't any item pointing to any<br>of the cgi files. So that's out. And like I said, when copying a<br>statusmap.cgi from another instance/folder to the new one and run the<br>new instance, I get the error message where it's pointing to the "other"<br>directory.<br><br>Incidentally, how do you do a strings command? hehe<br><br>Louie<br><br>On Fri, 2002-10-11 at 04:25, Carroll, Jim P [Contractor] wrote:<br></pre>
  <blockquote type="cite">
    <pre wrap="">I might be missing something here, but I'm reasonably certain that the<br>binaries don't have any pathnames to config files hardcoded.  Having said<br>that, the only reason I can see that this 3rd instance would fail, is that<br>the config file you're specifying on startup still has the pathname to the<br>'original' directory.  Try to grep through the config files for this 3rd<br>instance, for any occurrences of the 'original' directory.<br><br>Failing that, do a 'strings' command on each of the binaries and grep for<br>the 'original' directory.  I suspect you won't find the pathnames hardcoded.<br>:)<br><br>As you mention in another e-mail, I'd be surprised if the gd libraries can't<br>'support' 3 instances of Nagios.<br><br>jc<br><br></pre>
    <blockquote type="cite">
      <pre wrap="">-----Original Message-----<br>From: Louie Cagasan [<a class="moz-txt-link-freetext" href="mailto:fireant@zpdee.net">mailto:fireant@zpdee.net</a>]<br>Sent: Thursday, October 10, 2002 8:52 AM<br>To: Carroll, Jim P [Contractor]<br>Cc: <a class="moz-txt-link-abbreviated" href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>; <a class="moz-txt-link-abbreviated" href="mailto:freddy_frouin@fluxus.net">freddy_frouin@fluxus.net</a>;<br><a class="moz-txt-link-abbreviated" href="mailto:eljalforja@skycablenet.com">eljalforja@skycablenet.com</a>; <a class="moz-txt-link-abbreviated" href="mailto:juvs@skycablenet.com">juvs@skycablenet.com</a>;<br><a class="moz-txt-link-abbreviated" href="mailto:agattud@skycablenet.com">agattud@skycablenet.com</a><br>Subject: RE: [Nagios-users] Multiple nagios monitors in one machine<br><br><br>Hi Jim and Freddy,<br><br>I tried doing that by copying the missing cgi files statusmap.cgi,<br>trends.cgi and hi
 
stogram.cgi but when I ran that instance of <br>nagios and<br>click on the statusmap, it says it can't find the ORIGINAL directory<br>these cgi files were originally compiled for. so it won't work.<br><br>As for Freddy's comments, what I did was treat every <br>installation like a<br>new installation: deleting the source tree then getting the files from<br>the tarball but apparently, it can't locate the gd libraries <br>for these 3<br>cgi files from /usr/lib or /usr/local/lib and /usr/include and<br>/usr/local/include.  But the thing is: if it can't locate the gd<br>library, why was I able to install it in the first place? Go figure...<br><br>Would Ethan Galstad have an answer for this you think? Hi Ethan! =)<br><br>Thanks,<br><br>Louie<br><br>On Wed, 2002-10-09 at 23:55, Carroll, Jim P [Contractor] wrote:<br></pre>
      <blockquote type="cite">
        <pre wrap="">Louie, I don't know why you don't just manually copy a <br></pre>
        </blockquote>
        <pre wrap="">working tree into the<br></pre>
        <blockquote type="cite">
          <pre wrap="">3rd target directory, and manually search/replace pathnames <br></pre>
          </blockquote>
          <pre wrap="">in the config<br></pre>
          <blockquote type="cite">
            <pre wrap="">files.<br><br>jc<br><br></pre>
            <blockquote type="cite">
              <pre wrap="">-----Original Message-----<br>From: Freddy Frouin [<a class="moz-txt-link-freetext" href="mailto:freddy.frouin@fluxus.net">mailto:freddy.frouin@fluxus.net</a>]<br>Sent: Wednesday, October 09, 2002 2:17 AM<br>To: Louie Cagasan<br>Cc: <a class="moz-txt-link-abbreviated" href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>Subject: Re: [Nagios-users] Multiple nagios monitors in <br></pre>
              </blockquote>
              </blockquote>
              <pre wrap="">one machine<br></pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre wrap=""><br>maybe you've done some bad operation by the past in this <br>directory... did<br>you tryed to clean the config.cache file before reconfiguring <br>? did you tryed to<br>delete the source tree and to get it again from the tgz <br>archive and to try to<br>recompile it ? are you using multiple users for each version <br>of nagios you plan<br>to deploy ? if yes, check env var for each users...<br><br>'hope this help,           Freddy.<br><br>On 09 Oct 2002 06:31:28 +0800<br>Louie Cagasan <a class="moz-txt-link-rfc2396E" href="mailto:fireant@zpdee.net"><fireant@zpdee.net></a> wrote:<br><br></pre>
                  <blockquote type="cite">
                    <pre wrap="">I'm trying to do this on just one machine, e.g.,<br><br>/opt/nagios/network1<br>/opt/nagios/network2<br>/opt/nagios/network3<br><br>or<br><br>/opt/network1/nagios/<br>/opt/network2/nagios<br>/opt/network3/nagios<br><br>preferably the first one.  I've successfully installed <br></pre>
                    </blockquote>
                    </blockquote>
                    </blockquote>
                    <pre wrap="">and ran two<br></pre>
                    <blockquote type="cite">
                      <blockquote type="cite">
                        <blockquote type="cite">
                          <pre wrap="">monitors, with the first in the directory /opt/nagios <br></pre>
                          </blockquote>
                          </blockquote>
                          </blockquote>
                          <pre wrap="">and another in<br></pre>
                          <blockquote type="cite">
                            <blockquote type="cite">
                              <blockquote type="cite">
                                <pre wrap="">/opt/net2/nagios, with the statusmaps and all but I'm just not<br>successful with doing a third.  The configure error is <br></pre>
                                </blockquote>
                                </blockquote>
                                </blockquote>
                                <pre wrap="">that it's not<br></pre>
                                <blockquote type="cite">
                                  <blockquote type="cite">
                                    <blockquote type="cite">
                                      <pre wrap="">locating those gd,png, and jpg libraries.  Which is <br></pre>
                                      </blockquote>
                                      </blockquote>
                                      </blockquote>
                                      <pre wrap="">strange, since<br></pre>
                                      <blockquote type="cite">
                                        <blockquote type="cite">
                                          <blockquote type="cite">
                                            <pre wrap="">it worked for the first two.  Does anybody know what <br></pre>
                                            </blockquote>
                                            </blockquote>
                                            </blockquote>
                                            <pre wrap="">may be wrong?<br></pre>
                                            <blockquote type="cite">
                                              <blockquote type="cite">
                                                <blockquote type="cite">
                                                  <pre wrap="">TIA,<br>Louie<br><br><br><br><br><br><br><br>-------------------------------------------------------<br>This sf.net email is sponsored by:ThinkGeek<br>Welcome to geek heaven.<br><a class="moz-txt-link-freetext" href="http://thinkgeek.com/sf">http://thinkgeek.com/sf</a><br>_______________________________________________<br>Nagios-users mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br><br></pre>
                                                  </blockquote>
                                                  <pre wrap=""><br>-- <br>Freddy Frouin<br>Responsable Supervision<br>Fluxus - British Telecom<br>30, rue du Château des Rentiers<br>75013 Paris<br><br>Tél: +33 (0)1 44 97 70 00<br>Fax: +33 (0)1 44 97 70 07<br><br><br>-------------------------------------------------------<br>This sf.net email is sponsored by:ThinkGeek<br>Welcome to geek heaven.<br><a class="moz-txt-link-freetext" href="http://thinkgeek.com/sf">http://thinkgeek.com/sf</a><br>_______________________________________________<br>Nagios-users mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br><br></pre>
                                                  </blockquote>
                                                  </blockquote>
                                                  <pre wrap=""><br></pre>
                                                  </blockquote>
                                                  </blockquote>
                                                  <pre wrap=""><!----><br><br><br><br>-------------------------------------------------------<br>This sf.net email is sponsored by:ThinkGeek<br>Welcome to geek heaven.<br><a class="moz-txt-link-freetext" href="http://thinkgeek.com/sf">http://thinkgeek.com/sf</a><br>_______________________________________________<br>Nagios-users mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br><br><br></pre>
                                                  </blockquote>
                                                  <br>
                                                  <pre class="moz-signature" cols="$mailwrapcol">-- 
Russell Scibetti
Quadrix Solutions, Inc.
<a class="moz-txt-link-freetext" href="http://www.quadrix.com">http://www.quadrix.com</a>
(732) 235-2335, ext. 7038
</pre>
                                                  <br>
                                                  </body>
                                                  </html>