setting check_external_commands et al in cfg_file files

sean finney seanius at seanius.net
Sun Feb 12 10:48:06 CET 2006


hi ethan et al,

is there any reason certain nagios.cfg configuration directives
are not able to be set in configuration files other than nagios.cfg?

to give a full example:

i'd like to give the debian packages of nagios the ability to
install with external commands enabled or disabled at the
choice of the admin (using debian's debconf to decide).  the
cleanest way to do this would be to keep this specific option
in a seperate cfg_file-included file, so that when changes are made,
they have the least impact and are seperated from the rest of the
configuration.  however, if i do  this, i get the following error:

copelandia[~/debian/nagios2/build-area/nagios2-2.0/base]10:34:20$ sudo nagios2 /etc/nagios2/nagios.cfg

Nagios 2.0
Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
Last Modified: 02-07-2006
License: GPL

Nagios 2.0 starting... (PID=25740)
Error: Unexpected token or statement in file
'/etc/nagios2/conf.d/extcommands-nagios2.cfg' on line 9.
Bailing out due to one or more errors encountered in the configuration
files.  Run Nagios from the command line with the -v option to verify
your config before restarting. (PID=25740)


where line 9 contains:

copelandia[~/debian/nagios2/build-area/nagios2-2.0/base]10:44:42$ sed -n -e 9p /etc/nagios2/conf.d/extcommands-nagios2.cfg
check_external_commands=0

it seems that there is some subset of configuration options that can not
be set in cfg_file/cfg_dir included files.  is this intentional?  in the
interest of a timely release i'm going to remove this planned feature
for now but thought i'd ask...


	sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20060212/38428c52/attachment.sig>


More information about the Developers mailing list