Nagios 3.0rc1 reading incorrect config file


I installed Nagios 2.x via RPM but it did not work so I unistalled it and installed 3.0 by compiling it. (Better luck that way)

Everything installed and the web pages display but after editing the .cfg files in /usr/local/nagios/etc and tried to restart Nagios to reload the config files it get this error:

Starting nagios:su: warning: cannot change directory to /var/log/nagios: No such file or directory

I have checked and there is no /var/log/nagios file or folder.

Nagios appears to restart but it doen’t show my new hosts that I added to the windows.cfg file. Only localhost is displayed.

Then I check the /usr/local/nagios/etc/nagios.cfg file and it all appears to be pointing to correct directories. So then I looked for another nagios.cfg file and there was on in /etc/nagios. This was the 2.9 config file. This is why I suspect that only the localhost is showing. I tried to copy the 3.x file to /etc/nagios overwriting the 2.9 file and restart but no luck.

I have also looked at the nagios file in /etc/init.d and it appears correct:


I also check the SYM links in rc3.d (S99nagios) and rc5.d (S99nagios) and they both point to /etc/init.d/nagios

Any suggestions?


Ok, Did mkdir /var/log/nagios and the error stopped but it did not create any log files. It doesn’t seem to matter of the owner of the folder is root or nagios, the error stopped but no files created.

I still think that the 2.9 config files are being loaded. I compiled from 3.x source so I don’t believe that it is running 2.9 core. How would I check? The web page says it it 3.x but that is just html code presenting that.


Update, found information in the manual that stated:

Remove the leading pound (#) sign from the following line in the main configuration file:


Now I get CONFIG ERROR!. Guess I keep punching away.


I figured it out. The sample entry in the config file was causing the hang up. Deleted the sample entry, reloaded the configuration and vola! Amazing what happens when you read the guide! Shame on me.