Hello, everybuddy.
I have installed nagios on a freshly installed CentOS 5.3 by following the instructions in this page:
<http://wiki.centos.org/HowTos/Nagios>
and some pages linked there to install the repos, etc.
Everything seems to be in place. I have not yet modified the config files, so it's just what came in the rpm's.
If I run:
nagios -v /etc/nagios/nagios.cfg
I get:
------------------------------------------
Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (
http://www.nagios.org)
Last Modified: 12-01-2008
License: GPL
Reading configuration data...
Running pre-flight check on configuration data...
Checking services...
...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
-----------------------------------------------
However:
service nagios start
Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.
Or if I remove the output redirection from line 125 of /etc/init.d/nagios which is:
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
then I get this:
------------------------------------
Starting nagios:
Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (
http://www.nagios.org)
Last Modified: 12-01-2008
License: GPL
Reading configuration data...
Error in configuration file '/etc/nagios/nagios.cfg' - Line 465 (Check result path is not a valid directory)
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data definitions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
CONFIG ERROR! Start aborted. Check your Nagios configuration.
---------------------------------
I've checked and the check_result_path directive in the nagios.cfg file points to a valid directory, where nagios has rwx.
And when I log into the Nagios web page, using nagiosadmin and the password I created for it, most of the links on the left give me an error page:
------------------------------------
Whoops!
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:
1. Check the Nagios log file for messages relating to startup or status data errors.
2. 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
http://www.nagios.org.
------------------------------------
If I comment out the check (line 125) and start nagios anyway, I still get this page.
Any clues, anyone?