Page 1 of 1

Problem with Nagvis after upgrade to 5.11.1

Posted: Wed Jul 12, 2023 11:25 am
by vappukuttan
I saw another topic open (but was for fresh install)
viewtopic.php?t=65814

This is similar issue, but for an environment which was working from NagiosXI 5.10.0 to 5.11.1. No errors on the upgrade logs. But now within Nagvis, I am seeing 'Problem (Backend: nagiosxi): Connection Problem (Backend: nagiosxi): The given instance name "localhost" in backend "nagiosxi" is not valid.'

I reviewed the nagvis.ini.php and it looks to be good.

TIA,
Vinod

Re: Problem with Nagvis after upgrade to 5.11.1

Posted: Fri Jul 14, 2023 1:32 pm
by vappukuttan
Hello,

I am guessing no one has an issue after upgrading to 5.11.1. I may try to restart apache or mysql or nagios over the weekend to see if that helps.

I still have the issue.
nagvis_error .png
Thank you,

Re: Problem with Nagvis after upgrade to 5.11.1

Posted: Sun Jul 16, 2023 12:13 pm
by vappukuttan
Hello,

After debugging it deeper, found that during the upgrade the instance_name data within SQL table is wrong/missing, I would expect default/localhost to be there. Not sure what the correct method to fix this is. Please let me know.

Code: Select all


MariaDB [nagios]> select * from nagios_instances;
+-------------+-----------+------+---------------------+---------------+-----------------------------------------------------------------------------------+
| instance_id | region_id | uuid | heartbeat           | instance_name | instance_description                                                              |
+-------------+-----------+------+---------------------+---------------+-----------------------------------------------------------------------------------+
|           1 |         1 | 0    | 1969-12-31 19:00:00 | unassigned    | new hosts and services go here until claimed by an instance (not implemented yet) |
+-------------+-----------+------+---------------------+---------------+-----------------------------------------------------------------------------------+
1 row in set (0.00 sec)


Re: Problem with Nagvis after upgrade to 5.11.1

Posted: Mon Jul 17, 2023 9:09 am
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

Re: Problem with Nagvis after upgrade to 5.11.1

Posted: Mon Jul 17, 2023 5:28 pm
by vappukuttan
Thank you for the response. Does that table only have 1 record to start with?

Does anyone know if this is a bug within the 5.11.1 ?

Thank you,

Re: Problem with Nagvis after upgrade to 5.11.1

Posted: Tue Aug 08, 2023 10:36 pm
by wbright
Yes I am seeing this on the servers running 5.11.1 that have DNS entries for the server name, I am not seeing it on my test servers that do not have a DNS entry or entry in the hosts file for the server name.

All of the servers have Centos 7, PHP 8.1.21, mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1, and Nagvis 1.9.8 installed

Re: Problem with Nagvis after upgrade to 5.11.1

Posted: Tue Aug 08, 2023 10:50 pm
by wbright
After doing the change to allow localhost as recommended during this thread my test server now comes up with the following error

You are not permitted to access this page (Overview/view)

on checking the "Support Information" the Current User Information differences

Working Server
User Logged In wbright (3)
User Auth Module
User Logon Module
User Trusted Auth Yes
User Roles [{"roleId":1,"name":"Administrators"}]
User Permissions {"*":{"*":{"*":[]}}}

Non-working Server
User Logged In wbright (6)
User Auth Module
User Logon Module
User Trusted Auth Yes
User Roles []
User Permissions []

Re: Problem with Nagvis after upgrade to 5.11.1

Posted: Sat Aug 12, 2023 1:44 pm
by vappukuttan
Hello,

I did it the other way, within nagvis.ini.php, i updated the instance to unassigned. That got it to work with no errors.
dbinstancename="unassigned"

Will have to see what the next update does to fix it up.

Thank you,
Vinod