Problems with the Nagvis back-end

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
User avatar
rhassing
Posts: 412
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Problems with the Nagvis back-end

Post by rhassing »

On a fresh Nagios XI 5.11.1 install the Nagvis Back-end of Nagios XI did not work.
I tried to fix it, but now it is still not working and I might even broken it :shock:

I get the following error message:
Failed to get objects: The given instance name "nagios" in backend "nagiosxi" is not valid.

This is how the Nagvis config looks like now:

Code: Select all

[backend_nagiosxi]
; type of backend - MUST be set
backendtype="ndomy"
; 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=""
; hostname for NDO-db
dbhost="localhost"
; portname for NDO-db
dbport=3306
; database name for NDO-db
dbname="nagios"
; username for NDO-db
dbuser="ndoutils"
; password for NDO-db
dbpass="n@gweb"
; prefix for tables in NDO-db
dbprefix="nagios_"
; instance name for tables in NDO-db
dbinstancename="nagios"
; maximum delay of the NDO Database in seconds
maxtimewithoutupdate=180
; path to the cgi-bin of this backend
htmlcgi="/nagios/cgi-bin"
This is the Nagvis Support info

Code: Select all

NagVis Version	1.9.34
PHP Version	8.1.2-1ubuntu2.13
MySQL Version	mysql Ver 8.0.33-0ubuntu0.22.04.2 for Linux on x86_64 ((Ubuntu))
OS	Linux nagiosxi 5.15.0-75-generic #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Webserver Information
SERVER_SOFTWARE	Apache/2.4.52 (Ubuntu)
SCRIPT_FILENAME	/usr/local/nagvis/share/frontend/nagvis-js/index.php
SCRIPT_NAME	/nagvis/frontend/nagvis-js/index.php
REQUEST_TIME	1689082247 (gmdate(): Tue, 11 Jul 2023 13:30:47 +0000)
PHP Information
error_reporting	30719
safe_mode	no
max_execution_time	600 seconds
memory_limit	1024M
loaded modules	Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, apache2handler, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, imap, intl, ldap, exif, mysqli, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, shmop, SimpleXML, snmp, sockets, sqlite3, ssh2, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, SourceGuardian, Zend OPcache
json_encode	Yes
json_decode	Yes
Client Information
USER_AGENT	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67
Logon Information
Logon Module	LogonSession
Auth Module	CoreAuthModSQLite
Authorization Module	CoreAuthorisationModSQLite
Logon Var	REMOTE_USER
REMOTE_USER	
Logon Create User?	1
Logon Create User Role?	Guests
Current User Information
User Logged In	nagiosadmin (3)
User Auth Module	
User Logon Module	
User Trusted Auth	Yes
User Roles	[{"roleId":1,"name":"Administrators"}]
User Permissions	{"*":{"*":{"*":[]}}}

The server is running the following OS:

Code: Select all

root@nagiosxi:/etc# cat os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@nagiosxi:/etc#
Rob Hassing
Image
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Problems with the Nagvis back-end

Post by tgriep »

To update the instance_name to localhost, run this in a root ssh session on the nagios server.
mysql -uroot -pnagiosxi nagios -e 'UPDATE nagios_instances SET instance_name = "localhost";'

Then Restart Apache and re-login to XI and go to Nagvis to see if the error is gone.

Thank You
Be sure to check out our Knowledgebase for helpful articles and solutions!
Post Reply