Re: [Nagios-devel] Nagios hosting & CGI config path

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Nagios hosting & CGI config path

Post by Guest »

Jason Martin wrote:
> I'm looking to set up a machine such that several groups can
> each own their own Nagios instance. I'd like to be able to set
> up a new environment pretty easily as I expect more groups will
> want one as the service grows. I forsee a problem with the CGI's
> since the path to their config file must be set at compile time.
> Although it is feasible to automate a ./configure [..]; make;
> make install, I'd like to have all the instance share one set of
> binaries.
>
> May I suggest that the CGI's be modified to accept the path to
> the cgi.cfg from an environmental variable passed from the
> webserver? It could function as an override to the compiled-in
> default. That way creating a new environment will just require
> creating some config dirs and writing some text to the webserver
> config.
>

Thay already do. Lines 238-248 of cgiutils.c;
char * get_cgi_config_location(void){
if(!cgiloc) {
cgiloc=getenv("NAGIOS_CGI_CONFIG");
if(!cgiloc) cgiloc=DEFAULT_CGI_CONFIG_FILE;
}
return cgiloc;
}
... and so on and so forth.
It also supports NAGIOS_COMMAND_FILE.
In cgi.cfg you can set all the other variables you could possibly need.


> Thanks,
> -Jason Martin

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Lead Developer





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked