?Bug? Cannot declare main config variable.

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
jbowen7
Posts: 6
Joined: Thu Sep 26, 2013 1:36 am

?Bug? Cannot declare main config variable.

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: ?Bug? Cannot declare main config variable.

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jbowen7
Posts: 6
Joined: Thu Sep 26, 2013 1:36 am

Re: ?Bug? Cannot declare main config variable.

Post by jbowen7 »

Ah hah!! thanks.. that alone is worth compiling for source to me.

Thanks again.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: ?Bug? Cannot declare main config variable.

Post by abrist »

No problem. Cheers!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked