Re: [Nagios-devel] Nagios Installer
-
Guest
Re: [Nagios-devel] Nagios Installer
On Mar 31, 2010, at 1:00 PM, Mohammed Murphy wrote:
> Hello again,
>=20
> Thanks for all your help and answers two weeks ago. I have come up =
with=20
> a few more questions that need answering. In this email, I want to ask=20=
> about how Nagios finds the main Nagios configuration file and the=20
> cgi/plugins directory.
The location of nagios.cfg is hard coded into the binary at compile =
time.
The daemon has no need to know where the CGI's are.
The daemon knows the location of each specific plugin from the =
command_line in each command{} definition.
> I wondered if there=20
> were any helpful environment variables which are set when Nagios is=20
> installed which would allow the installer-type application to find the=20=
> required paths automatically. Or whether there is a well-known=20
> methodology for tackling this kind of problem.
None that I know of. You could auto-search the common locations based on =
distributions (/usr/local/nagios/etc; /etc/nagios; others?) and/or =
confirm with the person running your script.
There are several macros that you are interested in that are available =
(http://nagios.sourceforge.net/docs/3_0/ ... configfile) =
that could be made available as environment macros but I believe that =
they are only visible to programs launched by the nagios daemon itself =
(plugins, notifications, etc). su to the nagios user and 'echo =
$NAGIOS_MAINCONFIGFILE' to test (assuming you've enable macros as =
environment variables in nagios.cfg).
--
Marc
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]