LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Nagios web login error..... (https://www.linuxquestions.org/questions/linux-software-2/nagios-web-login-error-258965/)

david_ross 01-05-2005 03:16 PM

Are you using SELinux in FC2?

dwarf007 01-07-2005 04:15 AM

how to check whethere is SELinux? I only know i am using FC2 :)

What are the best part of nagios? So far i am only know the use of Ping host alive.

Any of you know the other part of nagios?

Jamesk5 02-17-2005 05:41 AM

I'm having a similar problem
On trying to access my local testing servers nagios installation (http://192.168.0.135/nagios) I get the following error:

Forbidden
You don't have permission to access /nagios/ on this server.


--------------------------------------------------------------------------------

Apache/2.0.49 (Fedora) Server at 192.168.0.135 Port 80

I have no .htaccess files as I took them out to try and rectify the problem.

My httpd.conf file looks like this:

ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

Ive restarted apache several times. Other dirs work, but they are located in /var/www/html/.... so it must just be the alias.
Im running fedora core 2 - which may be the cause of my problems!

dwarf007 02-19-2005 03:06 AM

I think u need to change the access permission for both

/usr/local/nagios/etc and /usr/local/nagios/sbin

change this permission to 777 or 755, i tried with 777 and is ok

I am configuring nagios in RedHat 9 and its work fine.

for Fedora Core 2 , i had tried before, there is some problem when you access the nagios page. It didnt works even i copy the my RedHat 9 httpd.conf (which includes script alias and alias for nagios) to Fedora Core 2

I hope this help you.....

Jamesk5 02-19-2005 05:56 AM

thanks, it didnt work - so it might just be FC2.
does anyone know if there are any problems with running nagios in FC3??
Or anyone got more suggestions for getting it running in FC2??

dwarf007 02-19-2005 08:29 AM

I think is better to stick with RedHat 9 , Fedora Core seems much more better to be use for Desktop purpose. I think RedHat 9 is more stable, if you need new packages, just upgrade :)

If you are going for Nagios, i suggest use RedHat 9 should be no issues.

Jamesk5 02-19-2005 08:34 AM

thanks for ur help!
I'll have to see if i can get my hands on a copy of RH9 (I havent got fast internet so downloading isnt an option).
In the mean time, any help will be appreciated!!!!!!

Jamesk5 03-20-2005 05:43 AM

i got a copy of fc3, and fixed my problem with not being able to access /naigos/
but i now get the following msg when trying to access the CGIs
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache/2.0.52 (Fedora) Server at 192.168.0.5 Port 80

Server Log:
[Sun Mar 20 21:16:02 2005] [error] [client 192.168.0.219] (13)Permission denied: exec of '/usr/local/nagios/sbin/tac.cgi' failed, referer: http://192.168.0.5/nagios/side.html
[Sun Mar 20 21:16:02 2005] [error] [client 192.168.0.219] Premature end of script headers: tac.cgi, referer: http://192.168.0.5/nagios/side.html


I've got the whole of the /usr/local/nagios dir set to permissions of 777 .. I'm stumped when it comes to looking for the source of this problem!

dwarf007 03-21-2005 05:07 AM

I had check with my "tag.cgi" file, we cant config the file cause cant open by vi.
This might be Apache server again.... I am not sure with is kernel or might be many thing else.

Jamesk5 03-22-2005 06:55 AM

Ok.. ive finally fixed the problem mentioned above. it ended up being somthing to do with selinux.
Now I'm faced with the following error when trying to access the cgi's!!

Whoops!
Error: Could not open CGI config file '/usr/local/nagios/etc/cgi.cfg' for reading!

Here are some things you should check in order to resolve this error:


Make sure you've installed a CGI config file in its proper location. See the error message about for details on where the CGI is expecting to find the configuration file. A sample CGI configuration file (named cgi.cfg) can be found in the sample-config/ subdirectory of the Nagios source code distribution.
Make sure the user your web server is running as has permission to read the CGI config file.

Make sure you read the documentation on installing and configuring 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.




The file is there (because i can VI it) and the etc/ dir has permissions of 777.
Help anyone??

dwarf007 03-22-2005 08:38 AM

It seems that was the access of the nagios permission.

Do you manage to access the nagios monitoring site? Mine is http://NagiosServerIP/nagios/
What did you get after you access this site? Make sure you also start httpd service and nagios service.

If you got permission error, you can have a read on the documentation which stated how to create a nagios login user which access the URL.

the cgi.cfg is the main file to control your nagios other files. Make sure you configure your nagios proper when install it, that is the key to make it work cause the path pointing

Dont know answer your question or not? I dont really understand your situation......
I still have a lot of thing cant manage to configure in nagios, it is tough. Once done, it will be nice :)

Hope this help you....

Jamesk5 03-23-2005 01:57 AM

I can access http://nagiosIP/nagios/ fine - otherwise i wouldnt be getting the above error message.
As I unsderstand it, if you dont have the permissions (ie .htaccess) files set up and in the directory, you should be able to access the cgi files - I have been able to do that previously in my FC2 setup.
The cgi file has the right path:
Error: Could not open CGI config file '/usr/local/nagios/etc/cgi.cfg' for reading!
As i said, the file that is in that error message is there and it has 777 permissions.

I really have no idea whats the problem here, but thanks for your help!

dwarf007 03-23-2005 04:28 AM

I think this happen might be you accidently change some commands or add in invalid text in the cgi.cfg file. Then the file couldnt manage to run completely.

Since you can vi the file and with 777 permission, i think that is the only reason you cant run the file.
Maybe you should get back the original cgi.cfg file and reconfigure again.

Hope this help you...

Jamesk5 03-23-2005 05:50 AM

i just tried using the sample cgi.cfg (after renaming it to its right filename) and it didnt work!!!

omlex 02-13-2006 02:15 AM

nagios did not emit a sound alarm
 
Hi d!

I have problem with Nagios, I want it to send an alarm to my speaker everytime a host is down. Could you help me out with this problem?!

In my cgi.cfg I enabled:

host_unreachable_sound=hostdown.wav
service_critical_sound=hostdown.wav
....
....


And I have all these wavs in /usr/local/nagios/share/media/

BR


All times are GMT -5. The time now is 08:25 AM.