Hello all,
Sorry in advance if this is an insanely basic question but I've been poking at this problem for several hours (and yes, Google has NOT been my friend) and I'm out of ideas.
I am trying to install Nagios on my Macbook Air (10.8 - Mountain Lion). I installed from Homebrew and managed to get the Nagios daemon up and running (and complaining about swap space of all things). I have also configured PHP5 and have the nagios web interface going.
Here is where I'm stuck. Whenever I click on one of the left nav links that should be firing up the cgi scripts, I get a "Whoops! Error: could not read object configuration data" error. The logs are clear. When I run with the -n flag, it says everything is working ok.
My best guess is that I have some sort of permissions problem but I'm not sure what I need to do to troubleshoot this. The version of Nagios is l&g (3.4.1)
Any help would be very much appreciated!
N00b needing help with initial install on OSX
Re: N00b needing help with initial install on OSX
Some additional info:
1. I have verified that the CGI configuration is working by creating a small testcgi.cgi file in my /usr/local/Cellar/nagios/3.4.1/cgi-bin directory and have successfully displayed it via a browser (http://localhost/nagios/cgi-bin/testcgi.cgi) so I know that is working ok.
2. I have triple-checked the log files for both apache and nagios and am not seeing anything out of the ordinary in there
Any help would be much appreciated.
1. I have verified that the CGI configuration is working by creating a small testcgi.cgi file in my /usr/local/Cellar/nagios/3.4.1/cgi-bin directory and have successfully displayed it via a browser (http://localhost/nagios/cgi-bin/testcgi.cgi) so I know that is working ok.
2. I have triple-checked the log files for both apache and nagios and am not seeing anything out of the ordinary in there
Any help would be much appreciated.
Re: N00b needing help with initial install on OSX
Some more info:
I have verified that I can run the CGI scripts by hand from a terminal window by setting the REQUEST_METHOD env variable to GET and executing them. The end result is HTML and appears to be doing the right thing when I view it in a browser.
So it looks like, for whatever reason, the web interface is having a hard time executing the CGI scripts even though I have shown that I can run CGI scripts from this apache2 instance and can run the scripts themselves from the terminal.
The plot thickens...
I have verified that I can run the CGI scripts by hand from a terminal window by setting the REQUEST_METHOD env variable to GET and executing them. The end result is HTML and appears to be doing the right thing when I view it in a browser.
So it looks like, for whatever reason, the web interface is having a hard time executing the CGI scripts even though I have shown that I can run CGI scripts from this apache2 instance and can run the scripts themselves from the terminal.
The plot thickens...
Re: N00b needing help with initial install on OSX
The cgi's are looking for the objects.cache file. This file will only exist when the Nagios daemon is running. The file location is also specified in the main nagios.cfg file, so make sure it actually exists where Nagios thinks it should"Whoops! Error: could not read object configuration data" error.
Re: N00b needing help with initial install on OSX
I checked the nagios.cfg file and the objects.cache file is in the place that is specified in the config file. Since I can run the CGI's by hand and they do work, I'm guessing that this isn't the issue.
Thanks for the suggestion though. Any other ideas?
Thanks for the suggestion though. Any other ideas?
Re: N00b needing help with initial install on OSX
What happens when you run the following command?
Code: Select all
# nagios -v /path/to/nagios.cfgRe: N00b needing help with initial install on OSX
No errors or warnings.
So here's the weird thing. If I hack my httpd.conf file to have apache run as my user account, everything works fine. Feels massively like a permissions problem.
Any ideas?
So here's the weird thing. If I hack my httpd.conf file to have apache run as my user account, everything works fine. Feels massively like a permissions problem.
Any ideas?