Page 1 of 2

Nagvis Issues

Posted: Wed May 09, 2018 7:46 am
by bosecorp
I started to have issues with Nagvis. for some reason Nagvis is unable to display data for certain services. Such services are highlighted in blue. The actual services doe existing.


here is some relevant info

NagVis Version 1.5.10
PHP Version 5.4.16
MySQL Version mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
OS Linux usvanagiospxi3 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Webserver Information
SERVER_SOFTWARE Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips PHP/5.4.16
SCRIPT_FILENAME /usr/local/nagvis/share/frontend/nagvis-js/index.php
SCRIPT_NAME /nagvis/frontend/nagvis-js/index.php
REQUEST_TIME 1525870015 (gmdate(): Wed, 09 May 2018 12:46:55 +0000)
PHP Information
error_reporting 30719
safe_mode no
max_execution_time 90 seconds
memory_limit 256M
loaded modules Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, Reflection, session, standard, shmop, SimpleXML, sockets, mbstring, tokenizer, xml, apache2handler, curl, dom, fileinfo, gd, json, ldap, exif, mcrypt, mssql, mysql, mysqli, PDO, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, snmp, SourceGuardian, sqlite3, ssh2, sysvmsg, sysvsem, sysvshm, wddx, xmlreader, xmlwriter, xsl, zip, mhash

Re: Nagvis Issues

Posted: Wed May 09, 2018 4:36 pm
by tgriep
Nagvis stores the configuration files in the folder so can you go to that folder and post the cfg file here so we can view it?

Code: Select all

/usr/local/nagvis/etc/maps
Also, can you post the Nagios objects.cache file as well so we can match the services up.
A list of the services that are failing would be needed as well.

Re: Nagvis Issues

Posted: Thu May 10, 2018 7:21 am
by bosecorp
Just PM you the info requested.

like I said, the service do existing and the checks are happening. for the most part all services in this map are working OK, just few arent.

Re: Nagvis Issues

Posted: Thu May 10, 2018 8:32 am
by tgriep
I received the Nagvis configuration but we need the names of the services to see if the configurations have any issues with them.
Also, the objects.cache or the status.dat file will be needed as well.

Re: Nagvis Issues

Posted: Thu May 10, 2018 8:38 am
by tgriep
One thing to try is to repair the MYSQL database. If the status for those services are not updating, that could cause the issue you are having.
Instructions for repairing the database are as follows.
http://assets.nagios.com/downloads/nagi ... tabase.pdf

Re: Nagvis Issues

Posted: Thu May 10, 2018 10:13 am
by bosecorp
The service check are happening every 5 minutes without problems.

Re: Nagvis Issues

Posted: Thu May 10, 2018 11:25 am
by bosecorp
also when I go to WUI, General Configuration I get this error

PHP error in ajax request handler: Error: (8) Array to string conversion (/usr/local/nagvis/share/server/core/classes/WuiViewEditMainCfg.php:137)

Re: Nagvis Issues

Posted: Thu May 10, 2018 12:38 pm
by tgriep
I found a fix for the error when you go to the WUI, General Configuration menu.
The version of Nagvis on your system is one rev newer but you can try the patch and see if it fixes that issue.
If you manually upgraded Nagvis, it would of reverted the patch.
First, make a backup of the file.

Code: Select all

cp /usr/local/nagvis/share/server/core/classes/WuiViewEditMainCfg.php /usr/local/nagvis/share/server/core/classes/WuiViewEditMainCfg.php.bak
Then run this to patch the file.

Code: Select all

sed -i 's/.*\$arr\[\$propname\]\['\''default'\''\].*/if (\!is_array(\$prop\['\''default'\''\])) { & } /' /usr/local/nagvis/share/server/core/classes/WuiViewEditMainCfg.php
Restart apache by running

Code: Select all

service httpd restart
Then re-login to Nagvis and see if that error is gone.

Re: Nagvis Issues

Posted: Fri May 11, 2018 12:47 pm
by bosecorp
Yes, that worked

thanks alot

Re: Nagvis Issues

Posted: Fri May 11, 2018 12:52 pm
by tgriep
Your welcome.