I’m new to Nagios. I have installed Nagios 3.0.6 on a stand-alone SuSE Linux Enterprise Server 11, SP1 server.
When I try to access the Event Log from the Reporting menu, I get the following error:
"It appears as though you do not have permission to view the log file…
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file."
I get the same error when I try to view hosts from the Configurations menu link at the bottom of the menu.
I did try copying the cgi.cfg file into the directory where my other config files are located, but a check of the configuration using the nagios -v command, indicated there is a problem in the cgi.cfg file where it indicates the location of the main nagios.cfg file. The location in the cgi.cfg file is correct and is /etc/nagios on my server.
3.0.6 is quite old, so i suspect you installed an RPM of some sort. As RPMs all have different path and ownership configurations it’s almost impossible to help…
The only advice i feel to give in this situation is try taking yourself a bit of time and reinstalling from source following the quickstart installation guide: nagios.sourceforge.net/docs/3_0/quickstart.html
I took your advise. I uninstalled the Novell rpm and grabbed the 3.2.3 Nagios and current plugins. I compiled them following the instructions in your link.
However, when I run nagios -v /usr/local/nagios/nagios.cfg, it tells me the package is ok with no errors. But, I can’t get the web page to display. It doesn’t recognize the nagios user and/or password when I try to log in.
Apache2 error logs show:
[Tue Nov 09 10:01:14 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 09 10:01:14 2010] [notice] Apache/2.2.10 (Linux/SUSE) mod_ssl/2.2.10 OpenSSL/0.9.8h configured – resuming normal operations
[Tue Nov 09 10:04:54 2010] [error] [client 10.1.8.72] File does not exist: /usr/local/nagios/share/<, referer: whq-nagios/nagios/
[Tue Nov 09 10:05:17 2010] [error] [client 10.1.8.72] File does not exist: /usr/local/nagios/share/<, referer: whq-nagios/nagios/
[Tue Nov 09 10:28:38 2010] [notice] caught SIGTERM, shutting down
[Tue Nov 09 10:33:28 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 09 10:33:28 2010] [notice] Apache/2.2.10 (Linux/SUSE) mod_ssl/2.2.10 OpenSSL/0.9.8h configured – resuming normal operations
I have a /usr/local/nagios/share directory. I’m not sure to what files you are referring. My nagios.cfg is in /usr/local/nagios/etc. I created a directory under /usr/local/nagios/etc called ‘whq.’ This is where I have my config files for my servers, i.e. contacts.cfg, hosts.cfg, services.cfg, etc. The /usr/local/nagios/etc/nagios.cfg has the correct pathing to these files and the files like resources.cfg in the /usr/local/nagios/etc directory.
The Nagios web interface appears to be working with a few exceptions. When I click on the “Hosts” link, only two of my hosts show a “Status” of “UP.” The rest all show “Pending,” and I can’t figure out the difference that allows two to show, but not the rest. One of the green “UP” servers is the localhost. However, I have the localhost also listed as a server by hostname and it does not indictate “UP.”
These additional issues may be clues or not related:
Clicking on the “Trends” link in the menu leads to a “Object Not Found” 404 error.
Trying to look at the “Event Log,”, “Process Info,” or “Scheduling Queue” link leads to an error that says:
“It appears as though you do not have permission to view the log file…
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.”
The “Configuration” menu link works, but when I select the type of data I want to view, I get the same CGI error from #2 above.
I feel like a dummy. My nagios.cfg listed the user as nagiosadmin, but I was logged in as the user nagios. I added nagios to the nagios.cfg file and most of my issues went away. Not all, but most. Thanks for the help.
nagiosadmin is used as the web interface user.
THe files should be owned by user nagios (linux user) and group nagcmd (which includes the apache user).
When you say “the files” should be owned by nagios:nagcmd, do you mean the entire directory structure under /usr/local/nagios/etc or other files? I’m not clear on your meaning, sorry, but thanks for staying with me and helping.
Well, that answer doesn’t help much. I did follow those instructions to the letter. As I recall, the only file that had group ownership as nagcmd, was the /usr/local/nagios/etc/resource.cfg file. The rest of the files were owned nagios:nagios. Perhaps this was a fluke and not as it should be.
If you could answer this, it would be helpful: Should all of the nagios directory structure be owned by nagios:nagcmd? Or just some of the files?