Re: Nagios and Apache
resource_file=/usr/local/nagios/etc/resource.cfg works great for the default source install of Nagios. But switch it to a RPM, or PKG'd version of Nagios and you can't ensure that this directive will point to the right place or not. -Pete On 6/24/06, Lars Hansson [EMAIL PROTECTED] wrote: On Saturday 24 June 2006 18:13, Peter Blair wrote: At work we run Nagios across Linux, OpenBSD FreeBSD machines. Compiling it from source is the only way to ensure config file compatibility. Say what? How does the compilation affect the config file? The config file format is exactly the same no matter where or when you compile nagios. --- Lars Hansson
Re: Nagios and Apache
On 6/23/06, Spruell, Darren-Perot [EMAIL PROTECTED] wrote: Incidentally, if you haven't used the package(s) for Nagios, do. I had no problems and I went with a package install. No mysteries. At work we run Nagios across Linux, OpenBSD FreeBSD machines. Compiling it from source is the only way to ensure config file compatibility.
Re: Nagios and Apache
On Saturday 24 June 2006 18:13, Peter Blair wrote: At work we run Nagios across Linux, OpenBSD FreeBSD machines. Compiling it from source is the only way to ensure config file compatibility. Say what? How does the compilation affect the config file? The config file format is exactly the same no matter where or when you compile nagios. --- Lars Hansson
Nagios and Apache
Hi all, I've installed and configured nagios, and I can open the start page with no problems. But I don't have access to the links that monitor services, such as Tatical Overview. At apache log I have the following error messages: [Fri Jun 23 15:42:51 2006] [error] (13)Permission denied: exec of /cgi-bin/nagios/tac.cgi failed [Fri Jun 23 15:42:51 2006] [error] [client 127.0.0.1] Premature end of script headers: /cgi-bin/nagios/tac.cgi My httpd.conf is how it follows: ScriptAlias /cgi-bin/nagios /var/www/cgi-bin/nagios Directory /var/www/cgi-bin/nagios # SSLRequireSSL Options ExecCGI AuthName Nagios Access AuthType Basic AuthUserFile /var/www/nagios/htpasswd.users Require valid-user Order deny,allow Deny from all Allow from 127.0.0.1 /Directory Alias /nagios /var/www/nagios Directory /var/www/nagios # SSLRequireSSL Options ExecCGI Options None AllowOverride None AuthName Nagios Access AuthType Basic AuthUserFile /var/www/nagios/htpasswd.users Require valid-user Order deny,allow Deny from all Allow from 127.0.0.1 /Directory My apache server runs using the chroot feature. Could please anyone tell me what's going wrong? Thanks. -- Joco Salvatti Undergraduating in Computer Science Federal University of Para - UFPA web: http://www.openbsd-pa.org e-mail: [EMAIL PROTECTED]
Re: Nagios and Apache
On 6/23/06, Joco Salvatti [EMAIL PROTECTED] wrote: [Fri Jun 23 15:42:51 2006] [error] (13)Permission denied: exec of /cgi-bin/nagios/tac.cgi failed A quick guess: check your file permissions for tac.cgi. From errno(2): 13 EACCES Permission denied. An attempt was made to access a file in a way forbidden by its file access permissions. Cheers, Rogier -- If you don't know where you're going, any road will get you there.
Re: Nagios and Apache
From: [EMAIL PROTECTED] I've installed and configured nagios, and I can open the start page with no problems. But I don't have access to the links that monitor services, such as Tatical Overview. At apache log I have the following error messages: [Fri Jun 23 15:42:51 2006] [error] (13)Permission denied: exec of /cgi-bin/nagios/tac.cgi failed [Fri Jun 23 15:42:51 2006] [error] [client 127.0.0.1] Premature end of script headers: /cgi-bin/nagios/tac.cgi My httpd.conf is how it follows: ScriptAlias /cgi-bin/nagios /var/www/cgi-bin/nagios Directory /var/www/cgi-bin/nagios # SSLRequireSSL Options ExecCGI AuthName Nagios Access AuthType Basic AuthUserFile /var/www/nagios/htpasswd.users Require valid-user Order deny,allow Deny from all Allow from 127.0.0.1 /Directory Alias /nagios /var/www/nagios Directory /var/www/nagios # SSLRequireSSL Options ExecCGI Options None AllowOverride None AuthName Nagios Access AuthType Basic AuthUserFile /var/www/nagios/htpasswd.users Require valid-user Order deny,allow Deny from all Allow from 127.0.0.1 /Directory My apache server runs using the chroot feature. Could please anyone tell me what's going wrong? My config matches yours, except for the Allow directive. you are accessing things from 127.0.0.1?
Re: Nagios and Apache
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spruell, Darren-Perot Sent: Friday, June 23, 2006 3:22 PM To: Misc OpenBSD Subject: Re: Nagios and Apache From: [EMAIL PROTECTED] I've installed and configured nagios, and I can open the start page with no problems. But I don't have access to the links that monitor services, such as Tatical Overview. At apache log I have the following error messages: [Fri Jun 23 15:42:51 2006] [error] (13)Permission denied: exec of /cgi-bin/nagios/tac.cgi failed [Fri Jun 23 15:42:51 2006] [error] [client 127.0.0.1] Premature end of script headers: /cgi-bin/nagios/tac.cgi My httpd.conf is how it follows: ScriptAlias /cgi-bin/nagios /var/www/cgi-bin/nagios Directory /var/www/cgi-bin/nagios # SSLRequireSSL Options ExecCGI AuthName Nagios Access AuthType Basic AuthUserFile /var/www/nagios/htpasswd.users Require valid-user Order deny,allow Deny from all Allow from 127.0.0.1 /Directory Alias /nagios /var/www/nagios Directory /var/www/nagios # SSLRequireSSL Options ExecCGI Options None AllowOverride None AuthName Nagios Access AuthType Basic AuthUserFile /var/www/nagios/htpasswd.users Require valid-user Order deny,allow Deny from all Allow from 127.0.0.1 /Directory My apache server runs using the chroot feature. Could please anyone tell me what's going wrong? My config matches yours, except for the Allow directive. you are accessing things from 127.0.0.1? That was my concern... you could try the actual ip or possibly 'localhost'? Dan Farrell Applied Innovations [EMAIL PROTECTED]
Re: Nagios and Apache
Obvious, but ensure that /var/www/cgi-bin/nagios is a valid directory from the perspective of your chroot'd server. Another caveat is to ensure that the named pipe is accessable to both the nagios executable, and to the chroot'd cgi's (once they start working that is). Nagios references the pipe via absolute naming, so you may have to 'break' things a bit and create a symlink under your chroot directory of /usr/local/nagios/rw/nagios.cmd that points to the actual pipe. Also, try turning off chroot to see if that helps. That will at the least tell you if it's a visibility issue or not. Best of luck! On 6/23/06, Joco Salvatti [EMAIL PROTECTED] wrote: Hi all, I've installed and configured nagios, and I can open the start page with no problems. But I don't have access to the links that monitor services, such as Tatical Overview. At apache log I have the following error messages: [Fri Jun 23 15:42:51 2006] [error] (13)Permission denied: exec of /cgi-bin/nagios/tac.cgi failed [Fri Jun 23 15:42:51 2006] [error] [client 127.0.0.1] Premature end of script headers: /cgi-bin/nagios/tac.cgi My httpd.conf is how it follows: ScriptAlias /cgi-bin/nagios /var/www/cgi-bin/nagios Directory /var/www/cgi-bin/nagios # SSLRequireSSL Options ExecCGI AuthName Nagios Access AuthType Basic AuthUserFile /var/www/nagios/htpasswd.users Require valid-user Order deny,allow Deny from all Allow from 127.0.0.1 /Directory Alias /nagios /var/www/nagios Directory /var/www/nagios # SSLRequireSSL Options ExecCGI Options None AllowOverride None AuthName Nagios Access AuthType Basic AuthUserFile /var/www/nagios/htpasswd.users Require valid-user Order deny,allow Deny from all Allow from 127.0.0.1 /Directory My apache server runs using the chroot feature. Could please anyone tell me what's going wrong? Thanks. -- Joco Salvatti Undergraduating in Computer Science Federal University of Para - UFPA web: http://www.openbsd-pa.org e-mail: [EMAIL PROTECTED]
Re: Nagios and Apache
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Blair Sent: Friday, June 23, 2006 4:02 PM To: Joco Salvatti Cc: Misc OpenBSD Subject: Re: Nagios and Apache Obvious, but ensure that /var/www/cgi-bin/nagios is a valid directory from the perspective of your chroot'd server. I would say that it is a valid directory... it was on my installation. Isn't /var/www/cgi-bin a valid chroot directory by definition? Another caveat is to ensure that the named pipe is accessable to both the nagios executable, and to the chroot'd cgi's (once they start working that is). Nagios references the pipe via absolute naming, so you may have to 'break' things a bit and create a symlink under your chroot directory of /usr/local/nagios/rw/nagios.cmd that points to the actual pipe. Also, try turning off chroot to see if that helps. That will at the least tell you if it's a visibility issue or not. I think if you turn off chroot then the other parts of the program that depend on the chroot'd directory structure will break when you un-chroot it... right? Dan Farrell Applied Innovations [EMAIL PROTECTED]
Re: Nagios and Apache
From: [EMAIL PROTECTED] Obvious, but ensure that /var/www/cgi-bin/nagios is a valid directory from the perspective of your chroot'd server. I would say that it is a valid directory... it was on my installation. Isn't /var/www/cgi-bin a valid chroot directory by definition? Incidentally, if you haven't used the package(s) for Nagios, do. I had no problems and I went with a package install. No mysteries. DS
Re: Nagios and Apache
On Fri, Jun 23, 2006 at 03:45:35PM -0300, Joco Salvatti wrote: [Fri Jun 23 15:42:51 2006] [error] (13)Permission denied: exec of /cgi-bin/nagios/tac.cgi failed /var[/www] mounted noexec in fstab?
Re: Nagios and Apache
Hi folks... Thanks for the suggestions. But I didn't have paid attention that the problem was at /etc/fstab file : noexec flag was active for /var partition. I should have paid better attention to that before. Thanks. On 6/23/06, Craig Skinner [EMAIL PROTECTED] wrote: On Fri, Jun 23, 2006 at 03:45:35PM -0300, Joco Salvatti wrote: [Fri Jun 23 15:42:51 2006] [error] (13)Permission denied: exec of /cgi-bin/nagios/tac.cgi failed /var[/www] mounted noexec in fstab? -- Joco Salvatti Undergraduating in Computer Science Federal University of Para - UFPA web: http://www.openbsd-pa.org e-mail: [EMAIL PROTECTED]