NAGIOS CONFIG ERROR! Start aborted

When my Debian is starting shows this message:

Starting nagios:CONFIG ERROR! Start aborted. Check your nagios configuration.

I’ve checked nagios configuration and it seems to be all right. I’ve installed and configured it step by step as my eBook says.

Web interface works, but if I press “tactical overview” shows me this:

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you’ve just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at nagios.org.

I’ve done everything, I’ve fixed some mistakes in hosts file, contacts file, nagios file in apache folder, etc., and I don’t know what else to do.
I’m testing nagios in localhost in a Debian Lenny LAMP.

Please help me, help will be very thankful.

Thanks.

I’ve being installing nagios again from the begining, and when i do this step:

-edit main nagios config file and remove all cfg_file and cfg_dir entries and add the following ones:

cfg_dir=/etc/nagios/commands
cfg_dir=/etc/nagios/hosts
cfg_dir=/etc/nagios/contacts
cfg_dir=/etc/nagios/timeperiods
cfg_dir=/etc/nagios/services

if I restart, before login with the root user, this message is showed while linux is booting:

Starting nagios:CONFIG ERROR! Start aborted. Check your nagios configuration.

Where is the problem?? Is it because folders still doesn’t exist?

Those lines are the only thing I’ve changed in the nagios.cfg file.

Can anybody help me??

Thanks for your time.

if the files don’t exist nagios will always have problems starting. If you tell it to look for fies it needs to find them

run /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

and solve the errors it throws at you.

If it’s your first nagios install (by the problems you are having i suspect it is) start with the “demo” config files you can create with “make install-config” and work your way from there, at least you should be able to get a basic localhost cehck working pretty fast.

Thanks, several code errors. Thanks for the command to ckeck errors.