Page 1 of 2

problem with nagvis after upgrade to latest version

Posted: Wed Feb 12, 2020 1:56 pm
by benhank
I've upgraded my server to the latest version. Afterwards when I try to open nagvis I am getting the following errors:

Code: Select all

Error: (0) Undefined property: CorePDOHandler::$data
URL: /nagvis/server/core/ajax_handler.php?mod=Overview&act=getObjectStates&i[]=map-webpacs&_ajaxid=1581528762
File: /usr/local/nagvis/share/server/core/classes/CorePDOHandler.php
Line: 306
#0 /usr/local/nagvis/share/server/core/classes/CorePDOHandler.php(306): nagvisExceptionErrorHandler(8, 'Undefined prope...', '/usr/local/nagv...', 306, Array)
#1 /usr/local/nagvis/share/server/core/classes/CorePDOHandler.php(332): CorePDOHandler->prep('SELECT? ...')
#2 /usr/local/nagvis/share/server/core/classes/GlobalBackendPDO.php(485): CorePDOHandler->query('SELECT? ...', Array)
#3 /usr/local/nagvis/share/server/core/classes/CoreBackendMgmt.php(478): GlobalBackendPDO->getHostState(Array, 0, Array)
#4 /usr/local/nagvis/share/server/core/classes/CoreBackendMgmt.php(169): CoreBackendMgmt->fetchStateCounts('ndomy_1', 'hostState', 0, Array)
#5 /usr/local/nagvis/share/server/core/classes/CoreModOverview.php(171): CoreBackendMgmt->execute()
#6 /usr/local/nagvis/share/server/core/classes/CoreModOverview.php(64): CoreModOverview->parseMapsJson(false, Array)
#7 /usr/local/nagvis/share/server/core/functions/index.php(120): CoreModOverview->handleAction()
#8 /usr/local/nagvis/share/server/core/ajax_handler.php(59): require('/usr/local/nagv...')
#9 {main}
thanks in advance!

Re: problem with nagvis after upgrade to latest version

Posted: Wed Feb 12, 2020 4:27 pm
by mbellerue
Which version did you upgrade from? Also, was it an in place upgrade, or did you migrate to a new server, do a fresh install of XI, and restore a backup?

Also, does NagVis load enough to go to Options -> Manage Backends? I'd like to make sure that's set to nagiosxi.

Re: problem with nagvis after upgrade to latest version

Posted: Fri Feb 14, 2020 12:12 pm
by benhank
this is a fresh install of nagios on a clean server. after the install of version 5.4.12 I testsed the restore which was working . I then Upgraded to latest version and noticed the error above.
I even upgraded nagvis to its latest version but the errors persist
I can browse to the backend cfg which is listed here:
Capture.PNG

Re: problem with nagvis after upgrade to latest version

Posted: Fri Feb 14, 2020 12:49 pm
by lmiltchev
Is your mysql db offloaded to a remote server? What is the output of the following command?

Code: Select all

grep 'dbhost\|dbuser\|dbpass' /usr/local/nagvis/etc/nagvis.ini.php

Re: problem with nagvis after upgrade to latest version

Posted: Fri Feb 14, 2020 1:49 pm
by benhank
dang Its pointing to my offloaded server..
Ive changed the ipaddress of db host back to local host and even tested it with the ip of my server but Im still getting the error.

Re: problem with nagvis after upgrade to latest version

Posted: Fri Feb 14, 2020 2:35 pm
by lmiltchev
If you are using localhost now, you should probably have the following in the "/usr/local/nagvis/etc/nagvis.ini.php" file:

Code: Select all

dbhost="localhost"
dbuser="ndoutils"
dbpass="n@gweb"
unless you changed the credentials.

What do you see in the "/usr/local/nagiosxi/html/config.inc.php" file under the "// db-specific connection information" section?

Re: problem with nagvis after upgrade to latest version

Posted: Fri Feb 14, 2020 3:58 pm
by benhank
here it tis

Re: problem with nagvis after upgrade to latest version

Posted: Fri Feb 14, 2020 4:34 pm
by lmiltchev
I even upgraded nagvis to its latest version but the errors persist
You cannot manually upgrade NagVis in XI as this is going to break it. Your config looks different than mine. For example, you have:

Code: Select all

; default backend (id of the default backend)
backend="ndomy_1"
[backend_ndomy_1]
; type of backend - MUST be set
backendtype="ndomy"
On my system, I have:

Code: Select all

; default backend (id of the default backend)
backend="nagiosxi"
[backend_nagiosxi]
; type of backend - MUST be set
backendtype="ndomy"
I haven't looked through the whole file, but I am sure there are going to be more differences.

I would recommend that you revert to your "pre-upgrade" snapshot of Nagios XI, and run the upgrade. If you get stuck on something, ask for help on the forum. Do not attempt to upgrade NagVis separately (manually)!

Re: problem with nagvis after upgrade to latest version

Posted: Fri Feb 14, 2020 7:04 pm
by benhank
thanks for the advice bro! ill give it a shot and let you know how it goes!

Re: problem with nagvis after upgrade to latest version

Posted: Mon Feb 17, 2020 9:48 am
by lmiltchev
Sure, let us know how it went.