Erro PHP / Mk-livestatus em Nagvis

3

Eu tenho Nagios e Nagvis instalados via pacotes Debian, mas quando eu executo Nagvis e tento entrar no menu "General Configuration" eu recebo este erro

Error: (0) Array to string conversion (/usr/share/nagvis/share/server/core/classes/WuiViewEditMainCfg.php:126)

#0 /usr/share/nagvis/share/server/core/classes/WuiViewEditMainCfg.php(126): nagvisExceptionErrorHandler(8, 'Array to string...', '/usr/share/nagv...', 126, Array)
#1 /usr/share/nagvis/share/server/core/classes/WuiViewEditMainCfg.php(44): WuiViewEditMainCfg->getFields()
#2 /usr/share/nagvis/share/server/core/classes/CoreModMainCfg.php(56): WuiViewEditMainCfg->parse()
#3 /usr/share/nagvis/share/server/core/functions/index.php(120): CoreModMainCfg->handleAction()
#4 /usr/share/nagvis/share/server/core/ajax_handler.php(63): require('/usr/share/nagv...')
#5 {main}

Eu também estou tendo um problema com backends em Nagvis. O check-mk-livestatus está instalado, mas recebo este erro ao passar os itens:

Problem (backend: live_1): Unable to connect to the /var/lib/nagios3/rw/live in backend live_1: Connection refused

Ou ao tentar adicionar coisas:

Unable to fetch data from backend - falling back to input field.

/ var / lib / nagios3 / rw / existe, mas não há arquivo "ao vivo". Eu realmente não tenho certeza do que está acontecendo, especialmente porque esses eram todos os pacotes Debian ... Aqui está a parte mais relevante do nagvis.ini.php:

; ----------------------------
; Backend definitions
; ----------------------------

; Example definition of a livestatus backend.
; In this case the backend_id is live_1
; The path /usr/local/nagios/var/rw has to exist
[backend_live_1]
backendtype="mklivestatus"
; The status host can be used to prevent annoying timeouts when a backend is not
; reachable. This is only useful in multi backend setups.
;
; It works as follows: The assumption is that there is a "local" backend which
; monitors the host of the "remote" backend. When the remote backend host is
; reported as UP the backend is queried as normal.
; When the remote backend host is reported as "DOWN" or "UNREACHABLE" NagVis won't
; try to connect to the backend anymore until the backend host gets available again.
;
; The statushost needs to be given in the following format:
;   "<backend_id>:<hostname>" -> e.g. "live_2:nagios"
;statushost=""
socket="unix:/var/lib/nagios3/rw/live"

Não há nada relacionado a 'backends' ou 'mklivestatus' em /var/log/nagios3/nagios.log Qualquer ajuda seria muito apreciada

    
por tod 20.06.2013 / 20:26

2 respostas

1

O problema com o Nagvis é um bug conhecido , que aparentemente foi corrigido pelo autor .

O problema com o socket no diretório rw pode ser o problema de permissões que está bem documentado em /usr/share/doc/nagios3/README.Debian.

    
por 21.06.2013 / 17:03
0

Eu sei que isso é um pouco tarde, Eu tive o mesmo problema. Corrija assim:

cd ~/source
wget wget http://mathias-kettner.com/download/mk-livestatus-1.2.4p2.tar.gz
tar zxvf mk-livestatus-1.2.4p2.tar.gz
cd mk-livestatus-1.2.4p2/
./configure --with-nagios4      (Or nagios3)
make install
vi /usr/local/nagios/etc/nagios.cfg

Adicionar:

broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live
event_broker_options=-1

Em:

#broker_module=/somewhere/module1.o
#broker_module=/somewhere/module2.o arg1 arg2=3 debug=0

chown -R nagios:nagcmd /usr/local/nagios/var/rw
service nagios restart
    
por 27.07.2016 / 13:18

Tags