Nagios install problem - Suse

I’m trying to install Nagios for the first time. When I run /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

I get this error

Cannot open config file ‘/usr/local/nagios/etc/checkcommands.cfg’ for reading: Invalid argument

I made sure that nagios.nagios is the owner of this file.

Any ideas?

check your ‘/usr/local/nagios/etc/checkcommands.cfg’ file for syntax errors and also make sure it’s 664 or even 660 and nagios.nagios

Permission is 664 nagios nagios. File is 0 bytes. I created it during the install.

FWIW, this is the guide I followed: novell.com/coolsolutions/feature/16723.html

Try the official docs.
www.nagios.org and follow the links to documentation.

Anyway if the file is empty it makes little sense calling it in nagios.cfg.

Luca

nagios.cfg isn’t empty

but checkcommand is as you told us.
and checkcommand is referenced in nagios.cfg

Luca

You created checkcommands.cfg? Well, it doesn’t do you much good if it’s empty, now does it? I can’t remember the exact command, but when you’re installing Nagios, you can use a make command to install the sample (non-empty) .cfg files, which will include checkcommands.cfg.

If you’re installing one of the beta releases of Nagios (such as 2.0b4), you may have skipped over this step as it’s not documented in the beta version documentation. If you pay attention during the compilation and installing, however, the output will show you what command I am referring to.

I think “make install-config” is the command you will want to run from the source directory.