3

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

1
  • Which version of debian?
    – Keith
    Jun 21, 2013 at 14:56

2 Answers 2

1

The issue with Nagvis is a known bug, which has apparently been fixed upstream.

The problem with the socket in the rw directory could be the permissions problem that is well documented in /usr/share/doc/nagios3/README.Debian.

0

I know this is maybe a bit to late, I had the same problem. Fix it like this:

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

Add:

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

Under:

#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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .