Apache2 (CGIs) y Nagios
Hola, buenos días,
tenemos una máquina con, entre otras cosas, Apache2 y Nagios para
monitorizar unos servidores.
Por separado ambos funcionan, pero a la hora de ver en tiempo real la
actividad de Nagios vía web es cuando aparecen los problemas.
Y dado que en Apache no estoy muy puesto, a ver si me podeis echar una
mano (gracias antes que nada). Os cuento brevemente:
Si intento consultar algo desde la web de Nagios, me dice: Whoops!
Error: Could not read host and service status information!
Al iniciar Apache dice:
gwmon:/home/admin# /etc/init.d/apache2 reload
Reloading web server config...[Mon Feb 05 12:18:07 2007] [warn] The
ScriptAlias directive in /etc/apache2/sites-enabled/nagios/apache.conf
at line 11 will probably never match because it overlaps an earlier
ScriptAlias.
[Mon Feb 05 12:18:07 2007] [warn] The ScriptAlias directive in
/etc/apache2/sites-enabled/nagios/apache.conf at line 12 will probably
never match because it overlaps an earlier ScriptAlias.
[Mon Feb 05 12:18:07 2007] [warn] The Alias directive in
/etc/apache2/sites-enabled/nagios/apache.conf at line 28 will probably
never match because it overlaps an earlier Alias.
[Mon Feb 05 12:18:07 2007] [warn] The Alias directive in
/etc/apache2/sites-enabled/nagios/apache.conf at line 37 will probably
never match because it overlaps an earlier Alias.
[Mon Feb 05 12:18:07 2007] [warn] The Alias directive in
/etc/apache2/sites-enabled/nagios/apache.conf at line 38 will probably
never match because it overlaps an earlier Alias.
done.
Dentro del fichero mencionado, la configuración debería ser la buena
(no la he modificado):
gwmon:/home/admin# cat /etc/apache2/sites-enabled/nagios/apache.conf
# BEGIN FOR NAGIOS
# Bug 160681 and 162986 say that the ScriptAlias should be
# /cgi-bin/nagios
# but some reports, 164925, (and the default config) say
# that it should be
# /nagios/cgi-bin
# Anyone having problems with this, PLEASE dig deeper in WHY
# it won't work for you...
#
# I'm enabling BOTH, just to be sure!
ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios
ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios
<DirectoryMatch /usr/lib/cgi-bin/nagios>
Options ExecCGI
AllowOverride AuthConfig
Order Allow,Deny
Allow From All
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
require valid-user
</DirectoryMatch>
# Where the stylesheets (config files) reside
#
Alias /nagios/stylesheets /etc/nagios/stylesheets
# Enable this ScriptAlias if you want to enable the grouplist patch.
# See http://apan.sourceforge.net/download.html for more info
# It allows you to see a clickable list of all hostgroups in the
# left pane of the Nagios web interface
#ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios/grouplist.cgi
# Where the HTML pages live(d)
Alias /netsaint /usr/share/nagios/htdocs
Alias /nagios /usr/share/nagios/htdocs
<DirectoryMatch /usr/share/nagios/htdocs>
Options FollowSymLinks
AllowOverride AuthConfig
Order Allow,Deny
Allow From All
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
require valid-user
</DirectoryMatch>
# END FOR NAGIOS
Disculpad el mail tan largo, pero creo que tenía que pegar la configuración.
Bueno, y si alguien me puede echar una mano, pues le estaré muy agradecido.
Saludos.
--
Adrià García-Alzórriz
adriagm@gmail.com
Reply to: