changing location of cgi.cfg file

Fran=?utf-8?B?w6c=?=ois Laupretre francois.laupretre-prestataire at calyon.com
Mon May 23 19:38:25 CEST 2005


Put your path in the NAGIOS_CGI_CONFIG environment variable (via apache's
setenv). Nagios looks for this variable before using the default path. Same
for NAGIOS_COMMAND_FILE. There is no way to configure it in the main
configuration file because the main cfg file is referenced from the cgi cfg
file. For a CGI, the only entry point is the cgi cfg.

-----Original Message-----
From: Steve Ensley [mailto:steve.ensley at gmail.com] 
Sent: Monday, May 23, 2005 6:57 PM
To: Nagios-users at lists.sourceforge.net
Subject: [Nagios-users] changing location of cgi.cfg file


The web front end (NagiosQL) I'm configuring for use with Nagios 2 assumes
the configuration is in a directory structure off /etc/nagios.
  I've gotten everything working reasonably well except, and I know this is
probably a painfully stupid question, but I cant find where to properly tell
nagios where to find the cgi.cfg file.  There doesnt seem to be a option for
it in nagios.cfg,  I tried a cfg_file= directive for it but it choked on
that on startup.  The manual refers to the "usual" location for the cgi.cfg
file but doesnt seem to mention how to make it an unusual location.

If its in /usr/local/nagios/etc, nagios is happy but NagiosQL cant find it
unless I configure nagiosql to look for it there (I would prefer to keep all
the config files together).  If I put it in /etc/nagios where NagiosQL would
like to find it by default then nagios starts OK but when you click on an
option on the nagios web interface it chokes with "Error: Could not open CGI
config file '/usr/local/nagios/etc/cgi.cfg' for reading!"  which of course
is not where it should be looking for it.
 
I can make everything work by creating a symbolic link to
/etc/nagios/cgi.cfg in /usr/local/nagios/etc/ but that's a clumsy hack and
there is undoubtedly a proper way to change this.

-- 
Steve

Knowledge is power... Power Corrupts.  Study hard... Be Evil.


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050523/66ca0901/attachment.html>
-------------- next part --------------
Ce message et ses pièces jointes (le "message") est destiné à l'usage    
exclusif de son destinataire.                                            
Si vous recevez ce message par erreur, merci d'en aviser immédiatement   
l'expéditeur  et de le détruire ensuite. Le présent message  pouvant  
être altéré à notre insu,  CALYON Corporate and Investment Bank                              
ne peut pas être engagé par son contenu. Tous droits réservés. 
          
This message and/or any  attachments (the "message") is intended for     
the sole use of its addressee.                                            
If you are not the addressee, please immediately notify the sender and    
then destroy the message.  As this message and/or any attachments may 
have been altered without our knowledge,  its content  is not legally 
binding on CALYON Corporate and Investment Bank. All rights reserved.                                                                


More information about the Users mailing list