Page 1 of 1

?Bug? Cannot declare main config variable.

Posted: Thu Sep 26, 2013 1:56 am
by jbowen7
I'm getting this error when trying to use a main configuration parameter that, in the documentation for Nagios Core 3, is available to use:

Code: Select all

root@gorgon:/etc/nagios3# service nagios3 restart
 * Restarting nagios3 monitoring daemon nagios3                                                                                                              

Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Error in configuration file '/etc/nagios3/nagios.cfg' - Line 1337 (UNKNOWN VARIABLE)
   Error processing main config file!



***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

 * errors in config!
Here's the variable in question:

Code: Select all

root@gorgon:/etc/nagios3# tail --lines=+1336 nagios.cfg 
# Allow Empty Hostgroup Assignement
allow_empty_hostgroup_assignment=1
Also I tried setting debugging like so:
debug_level=-1
debug_verbosity=1

But /var/log/nagios3/nagios.debug doesn't seem to get written to, unless the main config is fine.

Anybody have any suggestions?

Re: ?Bug? Cannot declare main config variable.

Posted: Thu Sep 26, 2013 9:59 am
by abrist
This directive was not introduced until after 3.2.3, so you would have to upgrade nagios in order to use it.
More information: http://tracker.nagios.org/view.php?id=210

Re: ?Bug? Cannot declare main config variable.

Posted: Thu Sep 26, 2013 11:48 pm
by jbowen7
Ah hah!! thanks.. that alone is worth compiling for source to me.

Thanks again.

Re: ?Bug? Cannot declare main config variable.

Posted: Fri Sep 27, 2013 9:47 am
by abrist
No problem. Cheers!