Dashboards Disappeared

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Dashboards Disappeared

Post by CFT6Server »

While building dashboards, all of a sudden all the dashboards in the account went missing. I cannot get them back. Is there any reason why that would happen (without user deleting it). Is there anyway of recovering them as it took quiet some time to build.

The only other reason is someone logged in with the same account and actively deleted the dashboards? but I don't see that in the audit page.

Thanks.
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Dashboards Disappeared

Post by vAJ »

There have been cases of dashboards disappearing in older versions, but there was a code fix implemented.

Can you please list your version?
Andrew J. - Do you even grok?
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Dashboards Disappeared

Post by avandemore »

As @vAJ noted, please include your XI version.

As see here:

https://support.nagios.com/forum/viewto ... 7&p=178119
Previous Nagios employee
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: Dashboards Disappeared

Post by CFT6Server »

Version is 5.2.9 and it doesn't give me bad dashboards. Just all my saved dashboards disappeared and "My dashboard" went empty.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Dashboards Disappeared

Post by ssax »

You wouldn't necessarily get that same message, please post the output of this command:

Code: Select all

echo "desc xi_usermeta;" | mysql -uroot -pnagiosxi nagiosxi
Also, please run this command and send me the resulting /tmp/dash_output.txt file:

Code: Select all

echo "select * from xi_usermeta where keyname like '%dash%';" | mysql -uroot -pnagiosxi nagiosxi > /tmp/dash_output.txt
Thank you
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: Dashboards Disappeared

Post by CFT6Server »

Code: Select all

[root@ tmp]# echo "desc xi_usermeta;" | mysql -uroot -pnagiosxi nagiosxi
Field   Type    Null    Key     Default Extra
usermeta_id     int(11) NO      PRI     NULL    auto_increment
user_id int(11) NO      MUL     NULL
keyname varchar(255)    NO              NULL
keyvalue        text    YES             NULL
autoload        smallint(6)     YES     MUL     0

Code: Select all

usermeta_id     user_id keyname keyvalue        autoload
2       1       dashboards      a:3:{i:0;a:4:{s:2:"id";s:4:"home";s:5:"title";s:9:"Home Page";s:4:"opts";N;s:8:"dashlets";a:1:{i:0;a:5:{s:2:"id";s:8:"s2gus40m";s:4:"name";s:22:"xicore_getting_started";s:5:"title";s:15:"Getting Started";s:4:"opts";a:6:{s:6:"height";i:365;s:5:"width";i:415;s:3:"top";i:0;s:4:"left";i:0;s:6:"pinned";i:0;s:6:"zindex";s:1:"1";}s:4:"args";a:0:{}}}}i:1;N;i:2;a:4:{s:2:"id";s:6:"screen";s:5:"title";s:10:"[ Screen ]";s:4:"opts";N;s:8:"dashlets";a:0:{}}}        0
Looks like the dashboards are just gone huh....
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Dashboards Disappeared

Post by ssax »

You are hitting that bug, do you have any XI backups that would contain the information so that we can restore from it? You can check here:

Code: Select all

ls -l /store/backups/nagiosxi
ls -l /store/backups/mysql/*/*
To fix the issue:

First delete what you currently have in there:

Code: Select all

echo "delete from xi_usermeta where keyname = 'dashboards';" | mysql -uroot -pnagiosxi nagiosxi
Then you need to change the field type so that it will support at least 4GB in that field:

Code: Select all

echo "alter table xi_usermeta modify keyvalue LONGTEXT;" | mysql -uroot -pnagiosxi nagiosxi
Now you should not experience the issue in the future.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: Dashboards Disappeared

Post by CFT6Server »

Unfortunately I don't have the backup file as this was a new instance being rebuilt. I guess lesson learned here, but I will put the update in there. This is a fresh deploy so I guess the bug still exists in the current version?

If I run delete - will this delete dashboards of all users?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Dashboards Disappeared

Post by ssax »

Was that output you sent of the one DB entry all that was returned? If so, there aren't any others, that command should have showed you everything in the DB for dashboards.

I will need to verify with the devs, I was the one who initially found the bug and found what the solution was so I'm pretty sure it should have been in 5.2.9.
Locked