Dashboards suddenly disappear

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Pablogc
Posts: 16
Joined: Fri Feb 26, 2016 6:15 am

Dashboards suddenly disappear

Post by Pablogc »

Hi Nagios Support team.

We are facing a problem based on Dashboards configuration. When we were working on editing some Dashlets in order to create a new ones and suddenly, for the user we were using ("nagiosadmin"), but this dashboards are still present for the rest of the users in the system.

After taking a look we tried, following this case (https://support.nagios.com/forum/viewto ... =6&t=49966) to run this steps and even trying with the script /usr/local/nagiosxi/scripts/repair_databases.sh.

And it did not work. After all, we tried, taking another case as a reference (https://support.nagios.com/forum/viewto ... 16&t=43811) to modify the parameter LONGTEXT but it also did not work.

The point is that the xi_usermeta instance seems to contain information, as you can see in the txt. Attached.

Please, could you help us with this issue?

Thanks in advance & BR!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Dashboards suddenly disappear

Post by benjaminsmith »

Hello @Pablogic<

I didn't see the attached document. Can you send the system profile so we can review the logs. Thanks.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message and then reply to this post to bring it up in the queue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Pablogc
Posts: 16
Joined: Fri Feb 26, 2016 6:15 am

Re: Dashboards suddenly disappear

Post by Pablogc »

here is the mentioned file.
I sent you the profile privately.

Thanks in advance!
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Dashboards suddenly disappear

Post by benjaminsmith »

Hello @Pablogic,

Thank you for sending over the system profile. I did notice some existing crashed db tables.

Code: Select all

191010  5:00:43 [ERROR] /usr/libexec/mysqld: Table './nagiosxi/xi_events' is marked as crashed and should be repaired
191010  5:00:43 [ERROR] /usr/libexec/mysqld: Table './nagiosxi/xi_events' is marked as crashed and should be repaired
However, before running the repair script again, I noticed that you are using a different port other than default. Go to /usr/local/nagiosxi/html/config.inc.php, and change the following setting to the new port number.

Code: Select all

// allow for different http port for subsystem calls 
$cfg['port_number'] = 8018;
You'll also need to modify the apache config to listen on this port as well.

Next run the following command to force a repair the database, and let me know if the issue persists.

Code: Select all

mysqlcheck -r -f -uroot -pnagiosxi --all-databases
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Pablogc
Posts: 16
Joined: Fri Feb 26, 2016 6:15 am

Re: Dashboards suddenly disappear

Post by Pablogc »

Hello,

I executed the command after modifying the port in the file you pointed out, and although It did fix a problem we had with automated Nagios XI backups (due to this tables crashing), It did not fix the problem with the Dashboards. I rebooted Nagios XI and logged in again with our admin user but I still can't see the Dashboards.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Dashboards suddenly disappear

Post by tgriep »

In later versions of XI, there were a couple of fixes done to fix the issue that you are having.
One was that the xi_usermeta table was not large enough which you have updated.
The other has to do with Special Characters (Language) in names of the objects you add to the dashboard.
I suggest upgrading to the latest version of Nagios XI. Follow this procedure.
https://assets.nagios.com/downloads/nag ... ctions.pdf

Once the dashboard is corrupt, it cannot be recovered and it has to be removed from the database and recreated.

First, run the following to find the user_id for the user that is currently having the problem:

Code: Select all

echo "select user_id, username from xi_users;" | mysql -t -uroot -pnagiosxi nagiosxi
Example output

Code: Select all

+---------+----------------+
| user_id | username       |
+---------+----------------+
|      18 | nagiosadmin    |
|      49 | john           |
|      53 | api            |
|      54 | back           |
|      55 | sue            |

Then delete the corrupted data that they have in the table for the dashboards:
- Change THEUSERID to the user_id from the above output.

Code: Select all

echo "delete from xi_usermeta where user_id = 'THEUSERID' and keyname = 'dashboards';" | mysql -uroot -pnagiosxi nagiosxi
Logout and login to the XI GUI again and recreate the dashboards for that user.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Pablogc
Posts: 16
Joined: Fri Feb 26, 2016 6:15 am

Re: Dashboards suddenly disappear

Post by Pablogc »

Hi Nagios Support Team.

Thank you for your support. Regarding the upgrade you mention in your last post, what version does it have this bugs corrected? Because after reviewing this bug in the Change Log we cannot see it.
In any case, do you have a list of bugs discovered per each Nagios Xi version?

Regarding the workaound of recreating all databases, is there any way to reassign the Dashboards to a new admin user or similar? Now we have 2 admin users available (one is faulty, as mentioned in this case, but the other one can see the dashboards), so would it be anyway to change the owners or sth like this?

Also regarding the workaround method, I see that your proposal does not ensure that the same bug will appear again in the future when restoring manually the dashboards, even after changing the LONGTEXT parameter. Is this right?

Thanks in advance & BR!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Dashboards suddenly disappear

Post by tgriep »

The following entry is for the Special Characters causing issues with the dashboard.
- Fixed dashboards disappearing with non-UTF8 names/titles (can use config.inc.php option $cfg['db_conn_utf8'] = 0; in some cases) [TPS#13051] -JO

It was fixed in 5.4.13 of XI.
See this.
https://assets.nagios.com/downloads/nag ... NGES-5.TXT
What is in that link, is all we have for the bug fixes.


What I posted isn't really a workaround, it is to delete the corrupted data so you can recreate the dashboards.
The LONGTEXT fix and the character issue is in the XI upgrade which should keep the dashboard issue from happening again.


One feature that has ben added is the ability to deploy dashboards which you can use to get the dashboard from the other user.
http://assets.nagios.com/downloads/nagi ... boards.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked