Interface WEB

1. Interface WEB

vinicius amaral almeida
arckanjo

(usa Debian)

Enviado em 12/11/2007 - 10:45h

Estou operando uma VMware com o Debina instalando. coloquei o NAGIOS Version 2.0b3 com o apache2. Quando tento acessar uma das paginas na qual tem acesso a uma CGI ele tentabaixar a CGI quando deveria mostrar as configurações dos servidores.
Alguem saberia o que eu devo fazer???

Obrigadão!!!


  


2. CGI x HTML

Rodrigo Ferreira Valentim
engos

(usa openSUSE)

Enviado em 12/11/2007 - 10:59h

O problema está só com a CGI?


Se você colocar o caminho do servidor apenas, ao invés do caminho da CGI, ele apresenta a tela padrão do Apache?
It's Works!


Você está colocando o caminho completo no navegador, incluindo o /cgi-bin/<nome da cgi>?


Se sim deixa a configuração de seu apache para podermos analisar melhor, possivelmente seu módulo de CGI não deve estar sendo carregado. Verifique se existe o link (se for apache 2):

/etc/apache2# ls -la mods-enabled/
lrwxrwxrwx 1 root root 27 2007-10-29 15:02 cgid.conf -> ../mods-available/cgid.conf


3. Re: Interface WEB

vinicius amaral almeida
arckanjo

(usa Debian)

Enviado em 12/11/2007 - 11:34h

Nao consigo na verdade acessar nenhuma pagina do site do NAGIOS

tudo que é CGI ele pede para baixa, ate mesmo com o caminho direto

o apache ta normal, ele ate abre o menu do nagios mas o frame da direita ele num faz nada...

coloquei o link que tu me falou mas ele nao mudou nao, continua tentando baixar os arquivos CGI's

qual será essa bendita configuração????


4. Configurações

Rodrigo Ferreira Valentim
engos

(usa openSUSE)

Enviado em 12/11/2007 - 15:03h

Não conheço o Nagios para saber como ele trata o menu dele com relação ao conteudo.

Coloque a configuração completa de seu Apache e do Nagios, assim fica mais facil de ajudar.


5. Re: Interface WEB

Thiago Fernandes de Melo
m4tri_x

(usa Ubuntu)

Enviado em 12/11/2007 - 15:09h

vi /etc/nagios/cgi.cfg

use_authentication=1


procura essa linha, deve estar = 0
coloca 1 e tenta denovo.
[]´s




6. configuração do apache

vinicius amaral almeida
arckanjo

(usa Debian)

Enviado em 13/11/2007 - 09:08h

/etc/apache2/sites-available/default

<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
RedirectMatch ^/$ /apache2-default/
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

Alias /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>

</VirtualHost>



7. Configuração do nagios

vinicius amaral almeida
arckanjo

(usa Debian)

Enviado em 13/11/2007 - 09:10h

cat /usr/local/nagios/etc/cgi.cfg

#################################################################
#
# CGI.CFG - Sample CGI Configuration File for Nagios 2.10
#
# Last Modified: 11-21-2006
#
#################################################################


# MAIN CONFIGURATION FILE
# This tells the CGIs where to find your main configuration file.
# The CGIs will read the main and host config files for any other
# data they might need.

main_config_file=/usr/local/nagios/etc/nagios.cfg



# PHYSICAL HTML PATH
# This is the path where the HTML files for Nagios reside. This
# value is used to locate the logo images needed by the statusmap
# and statuswrl CGIs.

physical_html_path=/usr/local/nagios/share



# URL HTML PATH
# This is the path portion of the URL that corresponds to the
# physical location of the Nagios HTML files (as defined above).
# This value is used by the CGIs to locate the online documentation
# and graphics. If you access the Nagios pages with an URL like
# http://www.myhost.com/nagios, this value should be '/nagios'
# (without the quotes).

url_html_path=/nagios/



# CONTEXT-SENSITIVE HELP
# This option determines whether or not a context-sensitive
# help icon will be displayed for most of the CGIs.
# Values: 0 = disables context-sensitive help
# 1 = enables context-sensitive help

show_context_help=0



# NAGIOS PROCESS CHECK COMMAND
# This is the full path and filename of the program used to check
# the status of the Nagios process. It is used only by the CGIs
# and is completely optional. However, if you don't use it, you'll
# see warning messages in the CGIs about the Nagios process
# not running and you won't be able to execute any commands from
# the web interface. The program should follow the same rules
# as plugins; the return codes are the same as for the plugins,
# it should have timeout protection, it should output something
# to STDIO, etc.
#
# Note: The command line for the check_nagios plugin below may
# have to be tweaked a bit, as different versions of the plugin
# use different command line arguments/syntaxes.

#nagios_check_command=/usr/local/nagios/libexec/check_nagios /usr/local/nagios/var/status.dat 5 '/usr/local/nagios/bin/nagios'



# AUTHENTICATION USAGE
# This option controls whether or not the CGIs will use any
# authentication when displaying host and service information, as
# well as committing commands to Nagios for processing.
#
# Read the HTML documentation to learn how the authorization works!
#
# NOTE: It is a really *bad* idea to disable authorization, unless
# you plan on removing the command CGI (cmd.cgi)! Failure to do
# so will leave you wide open to kiddies messing with Nagios and
# possibly hitting you with a denial of service attack by filling up
# your drive by continuously writing to your command file!
#
# Setting this value to 0 will cause the CGIs to *not* use
# authentication (bad idea), while any other value will make them
# use the authentication functions (the default).

use_authentication=1



# DEFAULT USER
# Setting this variable will define a default user name that can
# access pages without authentication. This allows people within a
# secure domain (i.e., behind a firewall) to see the current status
# without authenticating. You may want to use this to avoid basic
# authentication if you are not using a secure server since basic
# authentication transmits passwords in the clear.
#
# Important: Do not define a default username unless you are
# running a secure web server and are sure that everyone who has
# access to the CGIs has been authenticated in some manner! If you
# define this variable, anyone who has not authenticated to the web
# server will inherit all rights you assign to this user!

#default_user_name=guest



# SYSTEM/PROCESS INFORMATION ACCESS
# This option is a comma-delimited list of all usernames that
# have access to viewing the Nagios process information as
# provided by the Extended Information CGI (extinfo.cgi). By
# default, *no one* has access to this unless you choose to
# not use authorization. You may use an asterisk (*) to
# authorize any user who has authenticated to the web server.

#authorized_for_system_information=nagiosadmin,theboss,jdoe



# CONFIGURATION INFORMATION ACCESS
# This option is a comma-delimited list of all usernames that
# can view ALL configuration information (hosts, commands, etc).
# By default, users can only view configuration information
# for the hosts and services they are contacts for. You may use
# an asterisk (*) to authorize any user who has authenticated
# to the web server.

#authorized_for_configuration_information=nagiosadmin,jdoe



# SYSTEM/PROCESS COMMAND ACCESS
# This option is a comma-delimited list of all usernames that
# can issue shutdown and restart commands to Nagios via the
# command CGI (cmd.cgi). Users in this list can also change
# the program mode to active or standby. By default, *no one*
# has access to this unless you choose to not use authorization.
# You may use an asterisk (*) to authorize any user who has
# authenticated to the web server.

#authorized_for_system_commands=nagiosadmin



# GLOBAL HOST/SERVICE VIEW ACCESS
# These two options are comma-delimited lists of all usernames that
# can view information for all hosts and services that are being
# monitored. By default, users can only view information
# for hosts or services that they are contacts for (unless you
# you choose to not use authorization). You may use an asterisk (*)
# to authorize any user who has authenticated to the web server.


#authorized_for_all_services=nagiosadmin,guest,vinicius,nagios
#authorized_for_all_hosts=nagiosadmin,guest,vinicius,nagios



# GLOBAL HOST/SERVICE COMMAND ACCESS
# These two options are comma-delimited lists of all usernames that
# can issue host or service related commands via the command
# CGI (cmd.cgi) for all hosts and services that are being monitored.
# By default, users can only issue commands for hosts or services
# that they are contacts for (unless you you choose to not use
# authorization). You may use an asterisk (*) to authorize any
# user who has authenticated to the web server.

#authorized_for_all_service_commands=nagiosadmin
#authorized_for_all_host_commands=nagiosadmin




# STATUSMAP BACKGROUND IMAGE
# This option allows you to specify an image to be used as a
# background in the statusmap CGI. It is assumed that the image
# resides in the HTML images path (i.e. /usr/local/nagios/share/images).
# This path is automatically determined by appending "/images"
# to the path specified by the 'physical_html_path' directive.
# Note: The image file may be in GIF, PNG, JPEG, or GD2 format.
# However, I recommend that you convert your image to GD2 format
# (uncompressed), as this will cause less CPU load when the CGI
# generates the image.

#statusmap_background_image=smbackground.gd2



# DEFAULT STATUSMAP LAYOUT METHOD
# This option allows you to specify the default layout method
# the statusmap CGI should use for drawing hosts. If you do
# not use this option, the default is to use user-defined
# coordinates. Valid options are as follows:
# 0 = User-defined coordinates
# 1 = Depth layers
# 2 = Collapsed tree
# 3 = Balanced tree
# 4 = Circular
# 5 = Circular (Marked Up)

default_statusmap_layout=5



# DEFAULT STATUSWRL LAYOUT METHOD
# This option allows you to specify the default layout method
# the statuswrl (VRML) CGI should use for drawing hosts. If you
# do not use this option, the default is to use user-defined
# coordinates. Valid options are as follows:
# 0 = User-defined coordinates
# 2 = Collapsed tree
# 3 = Balanced tree
# 4 = Circular

default_statuswrl_layout=4



# STATUSWRL INCLUDE
# This option allows you to include your own objects in the
# generated VRML world. It is assumed that the file
# resides in the HTML path (i.e. /usr/local/nagios/share).

#statuswrl_include=myworld.wrl



# PING SYNTAX
# This option determines what syntax should be used when
# attempting to ping a host from the WAP interface (using
# the statuswml CGI. You must include the full path to
# the ping binary, along with all required options. The
# $HOSTADDRESS$ macro is substituted with the address of
# the host before the command is executed.
# Please note that the syntax for the ping binary is
# notorious for being different on virtually ever *NIX
# OS and distribution, so you may have to tweak this to
# work on your system.

ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$



# REFRESH RATE
# This option allows you to specify the refresh rate in seconds
# of various CGIs (status, statusmap, extinfo, and outages).

refresh_rate=45



# SOUND OPTIONS
# These options allow you to specify an optional audio file
# that should be played in your browser window when there are
# problems on the network. The audio files are used only in
# the status CGI. Only the sound for the most critical problem
# will be played. Order of importance (higher to lower) is as
# follows: unreachable hosts, down hosts, critical services,
# warning services, and unknown services. If there are no
# visible problems, the sound file optionally specified by
# 'normal_sound' variable will be played.
#
#
# <varname>=<sound_file>
#
# Note: All audio files must be placed in the /media subdirectory
# under the HTML path (i.e. /usr/local/nagios/share/media/).

#host_unreachable_sound=hostdown.wav
#host_down_sound=hostdown.wav
#service_critical_sound=critical.wav
#service_warning_sound=warning.wav
#service_unknown_sound=warning.wav
#normal_sound=noproblem.wav



8. Re: Interface WEB

vinicius amaral almeida
arckanjo

(usa Debian)

Enviado em 13/11/2007 - 09:11h

m4tri_x
a linha que vc falou ja estava com o valor 1, ja tinha alterado isso antes..
mas ele nao chega a pedir login e senha...
so tenta baixar a pomba do arquivo..

valew pela força!!!


9. Interface WEB

Carlos Vinicius Gomes de Souza
groo

(usa Slackware)

Enviado em 13/12/2007 - 17:32h

Galera to com um problema parecido, eu não consigo nem sequer acessar o meu nagios, recebo notificações de todas as ocorrencias, inclusive de novos equipamentos que insiro no nagios atraves dos arquivos de configuração, mas não consigo logar na interface web, alguem tem uma dica. Ja criei o usuario no htpasswd.user, ja dei permissão total nos arquivos.Eu uso CentOS4+Apache2+nagios2.9


10. Re: Interface WEB

Mário sales
mario.sales

(usa Debian)

Enviado em 19/04/2009 - 19:17h

Verifica o status do modulo PHP no seu Apache.
Esse erro é causado geralmente pela falta desse modulo.

Abraços






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts