PHP Error / Mk-livestatus in Nagvis

Posted by tod on Server Fault See other posts from Server Fault or by tod
Published on 2013-06-20T18:26:32Z Indexed on 2014/05/27 3:30 UTC
Read the original article Hit count: 753

Filed under:
|

I have Nagios and Nagvis installed via Debian packages, but when I run Nagvis and try to get into the "General Configuration" menu I get this error

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}

I'm also having an issue with backends in Nagvis. check-mk-livestatus is installed, but I get this error when hovering over items:

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

Or when trying to add things:

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

/var/lib/nagios3/rw/ exists, but there is no "live" file. I'm really not sure what is going on, especially since these were all Debian packages... Here is the most relevant part of the 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"

There is nothing relating to 'backends' or 'mklivestatus' in /var/log/nagios3/nagios.log Any help would be much appreciated

© Server Fault or respective owner

Related posts about debian

Related posts about nagios