Have installed Nagios3.2 on a Ubuntu8.04 server following the install guide at ubuntugeek.com/nagios-networ … buntu.html. All went well and seemed to install painlessly.
When I carry out a preflight check using /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg I get no errors?
The login works and the home page displays and documentation. Any other option selected from the left hand side bar brings up an apache error page, Internal Server Error.
[attachment=0]nagios error page.jpg[/attachment]
There must be a permissions fault or apache2 miss config somewheres but for the life of me I cant find it.
Very puzzling, I have obviously missed something somewhere? Can any one suggest what? Any help much appreciated.
There doesnt seem to be any errors in the apache error log relating to Nagios, but I have looked in the suexec.log and there are references there, sample below:
[2009-11-08 06:32:13]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: php5.fcgi
[2009-11-08 06:35:01]: uid: (1002/postrangers) gid: (1002/1002) cmd: php5.fcgi
[2009-11-08 08:53:10]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: tac.cgi
[2009-11-08 08:53:10]: command not in docroot (/usr/local/nagios/sbin/tac.cgi)
[2009-11-08 09:01:51]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: tac.cgi
[2009-11-08 09:01:51]: command not in docroot (/usr/local/nagios/sbin/tac.cgi)
[2009-11-08 09:01:53]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: statusmap.cgi
[2009-11-08 09:01:53]: command not in docroot (/usr/local/nagios/sbin/statusmap.cgi)
[2009-11-08 09:01:54]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:54]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:54]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:54]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:55]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:55]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:55]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:55]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:56]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:56]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:56]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:56]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:57]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:57]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:57]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:57]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:58]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:58]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:58]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
[2009-11-08 09:01:58]: command not in docroot (/usr/local/nagios/sbin/status.cgi)
[2009-11-08 09:01:59]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: outages.cgi
[2009-11-08 09:01:59]: command not in docroot (/usr/local/nagios/sbin/outages.cgi)
[2009-11-08 09:02:00]: uid: (1001/berilacsshack) gid: (1001/1001) cmd: status.cgi
does that mean anything to any one? The cgi’s for nagios are in /usr/local/nagios/sbin
GD libraries are installed as far as I can tell.
Configuration tab just displays the same error as I posted earlier.
nagios user and group are there as is the nagioscmd.
There must be a webserver issue, although, why would it post the home page and documentation if there was?
The only pages that display properly are Home and Documentation, anything below current status displays that apache error page.
That has happened from the start when I have just left the sample configurations installed by the nagios install has been completed as they were. And when I have changed them to match my server set up. That is entering my IP address were 127.0.0.1 was and the name of sever to what it is. On either setting it wont display. those settings were altered to match in corresponding .cfg files but no good so I have set them back to the default as per install.
My nagios.cfg file is located in the /etc/apache2/conf.d folder as per installation, is that correct?
Oh bugger, my typing is awfull, sorry that should have been
My nagios.conf is in the /etc/apache2/conf.d folder as per the install. I take it it should be read from there? and not copied to sites/enabled or sites/available?
Thanks luca for your time and patience with this. I read that link, and yes it is the very same problem as described. The interesting bit was the permissions bit and the results from running the grep command;
That is exactly the results that come up when I run it. Um, is this possibly the reason for the errors? Do I need to alter those to point to nagios?
Also my default webserver doc root is not /var/www/ but /home would this make any difference? As the initial nagios home page displays I wouldnt have thought so.
It must be a permissions problem with the cgi’s. Have I got my nagios nagiosadmin and www-data users and groups set right I am wondering?
My users&groups are:
user nagios - 1004
group nagios - 1004 linked to groups www-data & nagios
group nagcmd - 1005
I just followed those instructions on my own system and it took me just something over 10 minutes (including solving a couple of dependencies)
Should you decide to do it, please first remove any modified config files, purge RPMs or whatever and see that yuou have no leftovers.
thankyou luca, I will try that later.
Will apt-get remove --purge nagios3.2.0 do for removing the existing installation? Before I go and bugger up something else??
Got a 403 error on my 3 websites now so am having to look into this now DOH!
Sorry about the delay, but just a quick update. Nagios is installed and working. Not sure what the problem was, but followed the ubuntu quide again and all is well. Only thing I can think of was I didnt carry out the steps were it mentioned ubuntu 6.06 and 7.10, might have skipped them thinking it wa sfor older versions.
Any way all is go only one error showing, many thanks luca for your support.
Just one quick question tho, how do you change the default settings for service checks if you have changed port numbers?