Welcome to docs.opsview.com

Nagvis troubleshooting

This lists Nagvis issues when setting up. The FAQ section has more questions regarding using Nagvis.

Domain name message

If you receive an error message along these lines: Apache2 could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName, it is safe to ignore this.

Timezone warning message

I get some timezone warning messages on the Nagvis screens:

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'GMT/0.0/no DST' instead in /usr/local/nagios/nagvis/nagvis/includes/classes/objects/NagVisStatefulObject.php on line 360

You have to set a default timezone. The simplest way is to add into the php.ini file. For Debian, this is in /etc/php5/apache2/php.ini. Add the entry:

date.timezone=UTC

Restart apache.

Login

If you get the login error message:

Authentication to Opsview succeeds, but ticket is invalid for nagvis

Then it is likely that the shared secret has not been set correctly in the Apache configuration compared to the value in /usr/local/nagios/etc/opsview.conf.

Another possibility is that the incoming IP address to Nagvis is not the same as what Opsview Web is receiving. This could happen if you have more than one proxy in front of Opsview and Nagvis. In this case, you should disable the browser IP check in Opsview Web and also ignore it for Nagvis by adding this to the Apache configuration:

TKTAuthIgnoreIP on

Access denied

If you get:

Access denied for user 'nagios'@'localhost' (using password: YES)

Then the credentials to the database is incorrect. Reload Opsview and Opsview-Web as this will change the values. If this still fails, check the file /usr/local/nagios/nagvis/etc/nagvis.ini.php.

No Nagvis pages

If you get the error:

Fatal error: Cannot instantiate non-existent class: globalcontroller in /usr/local/nagios/nagvis/nagvis/index.php on line 38

Then it is likely that php4 is installed, not php5. Ensure that php5 is setup for apache.

Firefox downloads an x-httpd-php file

This was seen during testing where Firefox downloads a file instead of rendering the page. Restart Firefox.

This can also be due to the memory_limit setting within the php.ini configuration file on the master server - increase this value and restart the Apache web server.

The automap only shows "localhost"

You have to configure the “centre” or the “root” of the automap in the configuration file. The default is to find a root called “localhost”, but the Opsview server may not have a host address of “localhost”.

To define the default root, change the configuration file /usr/local/nagios/nagvis/etc/nagvis.ini.php so that:

defaultroot="opsview"

You can also change the root location by amending the URL to have the parameter root={hostname}.

Language translation is not working

If you get headers like mapSelect instead of Select map, this means the language translations are not working correctly.

Nagvis uses gettext to handle translating strings. For gettext to work, the appropriate languages must be known to the system.

The languages currently supported by Nagvis are en_US and de_DE.

The fix is to add the required locations into the supported OS system locales. Some systems, such as Redhat, do not require adding these locations.

The addition of the locations is OS dependent. For Debian, in /etc/locale.gen, add in the language, for example for en_US:

en_US.UTF-8 UTF-8

Then run:

locale-gen                               # Regenerates the language files
/etc/init.d/apache2 restart              # Restarts apache
rm /usr/local/nagios/nagvis/var/*-cache  # Deletes all the cache files

If you are still having problems, you can run this mini php5 script which simulates Nagvis' translation routines:

Start translation
<?
putenv('LC_ALL=en_US.UTF-8');
setlocale(LC_ALL, 'en_US.UTF-8');
bindtextdomain('nagvis', "/usr/local/nagios/nagvis/nagvis/includes/locale");
textdomain('nagvis');
echo gettext("selectMap");
echo "\n";
?>
End translation

If this shows “Select Map”, then the translations are fine - maybe the cache files have not been deleted? If it shows “selectMap”, then the translations are still not working.

The required graphviz binary "dot" could not be found

Have you installed GraphViz? Check the install pages for Nagvis for dependencies.

The given instance name "default" in backend "runtime" is not unique

This has been seen in testing where the runtime.nagios_instances table was holding multiple rows. This table should only ever have 1 row.

You can resolve by running:

mysql> delete from runtime.nagios_instances where instance_id != 1;
mysql> delete from runtime.nagios_programstatus where instance_id != 1;

Please let us know if you get this error.

Fatal Error: Allowed memory size of xxx bytes exhausted (tried to allocate yyy bytes)

There is a memory leak in some versions of NagVis - you can fix this error by increasing the allowed memory size within the php.ini file (increase the xxM figure appropriately)

memory_limit = xxM

and also restart apache (use stop and start rather than restart to ensure all memory is freed correctly)

Form submission fail with: The required value "%variable_name%" is not set

Disable or uninstall PHP Suhosin extension.

The PHP module mbstring is not loaded

You need to install a missing module: yum install php-mbstring. Then restart apache.

Navigation
Print/export
Toolbox