Nagios will not start - "Configuration validation failed"



Installed nagios on CentOS 5.5 as per the instructions in this page … n_CentOS_5. I did it twice on separate VMs. Once with setting proirities plugin as is recommended and once without

When running nagios -v on config file:

Reading configuration data...
   Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config file '/etc/nagios/objects/localhost.cfg'...
   Read object config files okay...[/code]


[code]Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check

when trying to start nagios I get,

[root ~]# service nagios start nagios is stopped Configuration validation failed [FAILED]

nagios log file does not exist at all (must have not even been started).

When attempting to run from shell “nagios -d /etc/nagios/nagios.cfg” it seems to run fine:

[[email protected] ~]# ps aux | grep nagios nagios 5302 0.0 0.1 17352 1848 ? Ssl Sep25 0:12 nagios -d /etc/nagios/nagios.cfg

But web interface still gives me errors it cant find config file.

What’s next?


Investigated a little more, messing around with the init.d script. I found that

exits with code 254 which causes the start command to fail.

Any ideas what 254 means? Is it permissions somehow? I tried setenable 0, but it did not change anything.


No idea, but you could try installinng from source, it’s not that difficult.



I am in the exact same boat after attempting to install and get Nagios running on CentOS 5.5.

Did you manage to come up with a solution?



I ended up using Zabbix in the lab and after a successful test it’s already in production.
I can’t however tell you which is better since I have not tried Nagios at all.



same problem on centos 5.5

my solution:

cat /etc/sysconfig/selinux


/etc/init.d/nagios start

nagios wurde angehalten
nagios starten: OK ]