Hi,
I'm using Chef and nagios cookbooks to provision servers and in the past few days, Nagios hasn't been working properly.
When provisioning, I'm getting this error.
================================================================================
Error executing action `start` on resource 'service[nagios]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /etc/init.d/nagios start ----
STDOUT: Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.
and running nagios -v hosts.cfg
Error in configuration file '/etc/nagios3/conf.d/hosts.cfg' - Line 4 (NULL value)
The top of my cfg file can be found here.
https://gist.github.com/mrlamroger/4f16b12ea5961ab53078
I've tried using a minimal cfg file and still get the same NULL value error.
I've tried running `file hosts.cfg` and it returned ASCII text.
The hostgroups are consistent with the hostgroups.cfg
Any suggestions would be appreciated. Thank you!
Error in configuration file - NULL Value
Re: Error in configuration file - NULL Value
You are supposed to run nagios -v against nagios.cfg like so:
Running it against your host.cfg file will not work.
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Former Nagios employee
Re: Error in configuration file - NULL Value
Thanks! I need to read more carefully.