Generate Nagios Config fail

Support requests, bug reports, questions etc.
MaxHaker
beginner
beginner
Posts: 8
Joined: Tue Mar 13, 2012 06:25

Generate Nagios Config fail

Post by MaxHaker » Wed Mar 14, 2012 00:29

when i goto generate nagios config it fails

Code: Select all

Nagios Core 3.3.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-25-2011
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nconf/temp/global/timeperiods.cfg'...
Processing object config file '/usr/local/nconf/temp/global/contacts.cfg'...
Processing object config file '/usr/local/nconf/temp/global/misccommands.cfg'...
Processing object config file '/usr/local/nconf/temp/global/checkcommands.cfg'...
Processing object config file '/usr/local/nconf/temp/global/host_templates.cfg'...
Processing object config file '/usr/local/nconf/temp/global/service_templates.cfg'...
Processing object config file '/usr/local/nconf/temp/global/contactgroups.cfg'...
Processing object config file '/usr/local/nconf/temp/Default_collector/service_dependencies.cfg'...
Processing object config file '/usr/local/nconf/temp/Default_collector/host_dependencies.cfg'...
Processing object config file '/usr/local/nconf/temp/Default_collector/advanced_services.cfg'...
Processing object config file '/usr/local/nconf/temp/Default_collector/services.cfg'...
Processing object config file '/usr/local/nconf/temp/Default_collector/servicegroups.cfg'...
Processing object config file '/usr/local/nconf/temp/Default_collector/hosts.cfg'...
Processing object config file '/usr/local/nconf/temp/Default_collector/hostgroups.cfg'...
Processing object config directory '/usr/local/nconf/static_cfg'...
Processing object config file '/usr/local/nconf/static_cfg/nagios.cfg'...
Error: Unexpected token or statement in file '/usr/local/nconf/static_cfg/nagios.cfg' on line 19.
Error processing object config files!


on line 19 of the nagios file

Code: Select all

 log_file=usr/local/nagios/var/nagios.log 


I have gone into the file an commented that line out, but when i go to generate the config again it just complains about the next line.
I was having issues with the deployment with copying nagios.cfg (because it didn't exist) but now that the nagios.cfg is in the
static_cfg directory to fix the deploy issue I'm getting these new errors on generating the config. not sure where to go from here..... :|

Any help is welcome THANKS IN ADVANCE!!

KEEP UP THE GREAT WORK ON NCONF!!!

User avatar
Tontonitch
NConf addict
NConf addict
Posts: 254
Joined: Fri May 07, 2010 10:14
Location: Thionville, France
Contact:

Re: Generate Nagios Config fail

Post by Tontonitch » Wed Mar 14, 2012 08:14

Missing slash problem.
Replace log_file=usr/local/nagios/var/nagios.log by log_file=/usr/local/nagios/var/nagios.log
Br,
Yannick

User avatar
agargiulo
NConf developer
NConf developer
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland
Contact:

Re: Generate Nagios Config fail

Post by agargiulo » Wed Mar 14, 2012 23:00

You could try disabling syntax checking for static_cfg. There is a constant in the main configuration file called CHECK_STATIC_SYNTAX. Try setting it to "0".

MaxHaker
beginner
beginner
Posts: 8
Joined: Tue Mar 13, 2012 06:25

Re: Generate Nagios Config fail

Post by MaxHaker » Sat Mar 17, 2012 21:55

Thank you so much agargiulo, setting it too zero got rid of the error. :D

Locked