Pular para o conteúdo

Erro NagVis nodmod [RESOLVIDO]

Responder tópico
  • Denunciar
  • Indicar
01 02

1. Erro NagVis nodmod [RESOLVIDO]

Enviado em 10/03/2011 - 18:18h

Pessoal,
Ainda na minha luta com o monitoramento agora é a vez do NagVis dar problema... estou com o Nagios instalado e funcionando redondinho. Daí partir para o nagvis.
Instalei o ndoutils e configurei os arquivos seguindo um tutorial encontrado aqui no VOL mesmo.
Consigo acessar o nagvis pelo browser e criar mapas normalmente, porém quando adiciono um ícone qualquer ele não está trazendo as informações monitoraas pelo nagios.

Quando passo o mouse no ícone criado ele mostra a mensagem:

Problem (Backend: ndomy_1): O nome da instancia informada "default" no backend "ndomy_1" é inválido.

Esse nome de instancia é configurado no arquivo ndomod.cfg e no arquivo nagvis.ini.php... não sei que o que colocar nesse lugar.

o serviço ndo2db sobe normalmente, porém começa a apresentar mensagens de erro, no arquivo nagios.log aparece o seguinte:


Nagios 3.2.3 starting... (PID=2212)
[1299791942] Local time is Thu Mar 10 18:19:02 BRT 2011
[1299791942] LOG VERSION: 2.0
[1299791942] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1299791942] ndomod: Successfully connected to data sink. 59 queued items to flush.
[1299791942] ndomod: Successfully flushed 59 queued items to data sink.
[1299791942] Event broker module '/usr/local/nagios/bin/ndomod-3x.o' initialized successfully.
[1299791942] Finished daemonizing... (New PID=2216)
[1299791942] ndomod: Error writing to data sink! Some output may get lost...
[1299791942] ndomod: Please check remote ndo2db log, database connection or SSL Parameters
[1299791947] ndomod: Successfully reconnected to data sink! 0 items lost, 115 queued items to flush.


Não sei mais o que pode ser... será que alguém pode me ajudar?

Desde já muito grato

Responder tópico

2. Re: Erro NagVis nodmod [RESOLVIDO]

Enviado em 17/03/2011 - 16:09h

Ninguém sabe nada sobre isso?... vixeeee... maldita lei de murphy... rsrs

3. Re: Erro NagVis nodmod [RESOLVIDO]

Enviado em 18/03/2011 - 10:38h

Apesar de todos os aplicativos (nagios, mysql e ndoutils) estarem rodando na mesma máquina... a solução foi utilizar tcpsocket no ndo apontando para o 127.0.0.1.

essa foi a solução que eu encontrei... está postada caso alguém tenha o mesmo problema...

abraços

4. Ajuda aí

Enviado em 03/05/2011 - 13:34h

Olá! Onde eu coloco o tcpsocket = 172.0.0.1? No ndomod.cfg? Se for eu não tive resultado algum continua dando o erro, apesar de eu conseguir monitorar o host clicando no ícone, mas o ícone não fica verde. Qual o pulo do gato?
Obrigado.

5. Re: Erro NagVis nodmod [RESOLVIDO]

Enviado em 05/05/2011 - 11:12h

Cara edita o arquivo ndo2db.cfg.

Na Seção Socket Type comenta a linha:

# socket_type=unix

E descomenta a linha:

socket_type=tcp

comente a linha:

#socket_name=/usr/local/nagios/var/ndo.sock

na seção DATABASE HOST deixe a linha conforme abaixo.

db_host=127.0.0.1

Depois altere o arquivo ndomod.cfg.

Procure a seção OUTPUT TYPE e deixe da seguinte forma:

output_type=tcpsocket
#output_type=file
#output_type=unixsocket

Na Seção OUTPUT deixe conforme abaixo:

#output=/usr/local/nagios/var/ndo.dat
output=127.0.0.1


Lembrando que a linha
tcp_port=5668

Deve estar igual nos dois arquivos.
e que no arquivo ndo2db.cfg vc deve configurar o nome da base e demais dados do mysql conforme vc instalou.

Espero ter ajudado.

Abs

6. Re: Erro NagVis nodmod [RESOLVIDO]

Enviado em 05/05/2011 - 11:20h

outro detalhe após cada alteração em qualquer um dos dois arquivo é necessário matar o processo do ndo2bd e iniciar novamente com o comando:

/usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg

e dentro do nagios.cfg deve ter a linha

broker_module=/usr/local/nagios/bin/ndomod-3x.o config_file=/usr/local/nagios/etc/ndomod.cfg

Obviamente alterando o caminho dos scripts para onde você instalou e caso esteja usando a versão 2 do nagios o nome correto é ndomod-2x.o e ndo2db-2x

abs

7. pois é...

Enviado em 11/05/2011 - 14:52h

continua ao passar o mouse no icone "O nome da instancia informada....", a configuração já tinha sido feita e não surtiu efeito. Lembrando que ao clicar no ícone o nagvis acha o host e suas informações monitoradas no nagios. Uma pergunta, ao inserir um icone do host no campo "host_name" aparece os hosts do nagios? no meu não, tenho que inserir manualmente.
:>(

8. Re: Erro NagVis nodmod [RESOLVIDO]

Enviado em 11/05/2011 - 16:07h

Tem que aparecer os hosts sim... se não está aparecendo na verdade ainda não está comunicando.

Verifica se ele está colocando os dados no mysql.

Quando vc iniciar o /usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg

e reiniciar o nagios, o ndo tem que postar os dados do nagios no mysql.

Verifica se os dados estão no mysql, se você utilizou a config padrão deve ter uma tabela chamada nagios e dentro dela os dados do nagios inseridos pelo ndo.

Caso os dados esteja lá o seu problema é na comunicação do nagvis com o mysql.

Faz esse teste e posta aqui pra gente.

abs

9. Re: Erro NagVis nodmod [RESOLVIDO]

Enviado em 11/05/2011 - 17:09h

Cara abaixo estão os arquivos ndo2db.cfg e ndomod.cfg que estou utilizando. bate com o seu pra ver se tem alguma coisa diferente:

#####################################################################
# NDO2DB DAEMON CONFIG FILE
#
# Last Modified: 01-02-2009
#####################################################################



# LOCK FILE
# This is the lockfile that NDO2DB will use to store its PID number
# in when it is running in daemon mode.

lock_file=/usr/local/nagios/var/ndo2db.lock



# USER/GROUP PRIVILIGES
# These options determine the user/group that the daemon should run as.
# You can specify a number (uid/gid) or a name for either option.

ndo2db_user=nagios
ndo2db_group=nagcmd



# SOCKET TYPE
# This option determines what type of socket the daemon will create
# an accept connections from.
# Value:
# unix = Unix domain socket (default)
# tcp = TCP socket

#socket_type=unix
socket_type=tcp



# SOCKET NAME
# This option determines the name and path of the UNIX domain
# socket that the daemon will create and accept connections from.
# This option is only valid if the socket type specified above
# is "unix".

#socket_name=/usr/local/nagios/var/ndo.sock



# TCP PORT
# This option determines what port the daemon will listen for
# connections on. This option is only vlaid if the socket type
# specified above is "tcp".

tcp_port=5668



# ENCRYPTION
# This option determines if the ndo2db daemon will accept SSL to encrypt the
# network traffic between module and ndo2db daemon.
# Both sides have to enable this feature which depends on SSL Libraries
# like openssl or kerberos
# This option is only valid if the output type
# option specified above is "tcpsocket".
#
# A value of '1' will enable this feature

use_ssl=0



# DATABASE SERVER TYPE
# This option determines what type of DB server the daemon should
# connect to.
# Values:
# mysql = MySQL
# pgsql = PostgreSQL

db_servertype=mysql



# DATABASE HOST
# This option specifies what host the DB server is running on.

db_host=127.0.0.1


# DATABASE PORT
# This option specifies the port that the DB server is running on.
# Values:
# 3306 = Default MySQL port
# 5432 = Default PostgreSQL port

db_port=3306



# DATABASE NAME
# This option specifies the name of the database that should be used.

db_name=nagios



# DATABASE TABLE PREFIX
# Determines the prefix (if any) that should be prepended to table names.
# If you modify the table prefix, you'll need to modify the SQL script for
# creating the database!

db_prefix=nagios_



# DATABASE USERNAME/PASSWORD
# This is the username/password that will be used to authenticate to the DB.
# The user needs at least SELECT, INSERT, UPDATE, and DELETE privileges on
# the database.

db_user=root
db_pass=<senhaDoMysql>



## TABLE TRIMMING OPTIONS
# Several database tables containing Nagios event data can become quite large
# over time. Most admins will want to trim these tables and keep only a
# certain amount of data in them. The options below are used to specify the
# age (in MINUTES) that data should be allowd to remain in various tables
# before it is deleted. Using a value of zero (0) for any value means that
# that particular table should NOT be automatically trimmed.

# Keep timed events for 24 hours
max_timedevents_age=1440

# Keep system commands for 1 week
max_systemcommands_age=10080

# Keep service checks for 1 week
max_servicechecks_age=10080

# Keep host checks for 1 week
max_hostchecks_age=10080

# Keep event handlers for 31 days
max_eventhandlers_age=44640

# Keep external commands for 31 days
max_externalcommands_age=44640




# DEBUG LEVEL
# This option determines how much (if any) debugging information will
# be written to the debug file. OR values together to log multiple
# types of information.
# Values: -1 = Everything
# 0 = Nothing
# 1 = Process info
# 2 = SQL queries

debug_level=-1



# DEBUG VERBOSITY
# This option determines how verbose the debug log out will be.
# Values: 0 = Brief output
# 1 = More detailed
# 2 = Very detailed

debug_verbosity=0



# DEBUG FILE
# This option determines where the daemon should write debugging information.

debug_file=/usr/local/nagios/var/ndo2db.debug



# MAX DEBUG FILE SIZE
# This option determines the maximum size (in bytes) of the debug file. If
# the file grows larger than this size, it will be renamed with a .old
# extension. If a file already exists with a .old extension it will
# automatically be deleted. This helps ensure your disk space usage doesn't
# get out of control when debugging.

max_debug_file_size=1000000
################################################################
#### FIM DO ARQUIVO NDO2DB
################################################################



#####################################################################
# NDOMOD CONFIG FILE
#
# Last Modified: 09-05-2007
#####################################################################


# INSTANCE NAME
# This option identifies the "name" associated with this particular
# instance of Nagios and is used to seperate data coming from multiple
# instances. Defaults to 'default' (without quotes).

instance_name=default



# OUTPUT TYPE
# This option determines what type of output sink the NDO NEB module
# should use for data output. Valid options include:
# file = standard text file
# tcpsocket = TCP socket
# unixsocket = UNIX domain socket (default)

#output_type=file
output_type=tcpsocket
#output_type=unixsocket



# OUTPUT
# This option determines the name and path of the file or UNIX domain
# socket to which output will be sent if the output type option specified
# above is "file" or "unixsocket", respectively. If the output type
# option is "tcpsocket", this option is used to specify the IP address
# of fully qualified domain name of the host that the module should
# connect to for sending output.

#output=/usr/local/nagios/var/ndo.dat
output=127.0.0.1

#output=/usr/local/nagios/var/ndo.sock



# TCP PORT
# This option determines what port the module will connect to in
# order to send output. This option is only valid if the output type
# option specified above is "tcpsocket".

tcp_port=5668



# ENCRYPTION
# This option determines if the module will use SSL to encrypt the
# network traffic between module and ndo2db daemon.
# Both sides have to enable this feature which depends on SSL Libraries
# like openssl or kerberos
# This option is only valid if the output type
# option specified above is "tcpsocket".
#
# A value of '1' will enable this feature

use_ssl=0



# OUTPUT BUFFER
# This option determines the size of the output buffer, which will help
# prevent data from getting lost if there is a temporary disconnect from
# the data sink. The number of items specified here is the number of
# lines (each of variable size) of output that will be buffered.

output_buffer_items=5000



# BUFFER FILE
# This option is used to specify a file which will be used to store the
# contents of buffered data which could not be sent to the NDO2DB daemon
# before Nagios shuts down. Prior to shutting down, the NDO NEB module
# will write all buffered data to this file for later processing. When
# Nagios (re)starts, the NDO NEB module will read the contents of this
# file and send it to the NDO2DB daemon for processing.

buffer_file=/usr/local/nagios/var/ndomod.tmp



# FILE ROTATION INTERVAL
# This option determines how often (in seconds) the output file is
# rotated by Nagios. File rotation is handled by Nagios by executing
# the command defined by the file_rotation_command option. This
# option has no effect if the output_type option is a socket.

file_rotation_interval=14400



# FILE ROTATION COMMAND
# This option specified the command (as defined in Nagios) that is
# used to rotate the output file at the interval specified by the
# file_rotation_interval option. This option has no effect if the
# output_type option is a socket.
#
# See the file 'misccommands.cfg' for an example command definition
# that you can use to rotate the log file.

#file_rotation_command=rotate_ndo_log



# FILE ROTATION TIMEOUT
# This option specified the maximum number of seconds that the file
# rotation command should be allowed to run before being prematurely
# terminated.

file_rotation_timeout=60



# RECONNECT INTERVAL
# This option determines how often (in seconds) that the NDO NEB
# module will attempt to re-connect to the output file or socket if
# a connection to it is lost.

reconnect_interval=15



# RECONNECT WARNING INTERVAL
# This option determines how often (in seconds) a warning message will
# be logged to the Nagios log file if a connection to the output file
# or socket cannot be re-established.

reconnect_warning_interval=15
#reconnect_warning_interval=900



# DATA PROCESSING OPTION
# This option determines what data the NDO NEB module will process.
# Do not mess with this option unless you know what you're doing!!!!
# Read the source code (include/ndbxtmod.h) to determine what values
# to use here. Values from source code should be OR'ed to get the
# value to use here. A value of -1 will cause all data to be processed.
# Read the source code (include/ndomod.h) and look for "NDOMOD_PROCESS_"
# to determine what values to use here. Values from source code should
# be OR'ed to get the value to use here. A value of -1 will cause all
# data to be processed.

data_processing_options=-1



# CONFIG OUTPUT OPTION
# This option determines what types of configuration data the NDO
# NEB module will dump from Nagios. Values can be OR'ed together.
# Values:
# 0 = Don't dump any configuration information
# 1 = Dump only original config (from config files)
# 2 = Dump config only after retained information has been restored
# 3 = Dump both original and retained configuration

config_output_options=2
###############################################
### Fim do ARQUIVO NDOMOD
###############################################

10. pois é de novo....

Enviado em 12/05/2011 - 13:49h

ndo rodando, nagios rodando, mysql meia bomba eu acho. Você poderia me passar o bizu de configuração do nagios no mysql? Apesar de seguir todos os passos e ver as tabelas do nagios no mysql eu acho que tem algo errado. Obrigado

11. Re: Erro NagVis nodmod [RESOLVIDO]

Enviado em 16/05/2011 - 21:38h

Cara o nagios mesmo não conecta direto no mysql.
Quem faz esse processo é o ndo...
as tabelas do nagios no mysql tem dados?

12. instalei o nagvis , porem...

Enviado em 01/02/2012 - 20:27h

para instalar eu segui a documentação e algumas alterções do nagvis; porem...


aparece esse erro quando vou acessá-lo:

Forbidden

You don't have permission to access /nagvis/ on this server.
Apache/2.2.20 (Ubuntu) Server at 10.1.1.6 Port 80


alguém pode me ajudar ae? fico grato...
01 02

Responder tópico

Responder tópico

Entre na sua conta para responder.

Fazer login para responder