Page 1 of 1
Dashboards Disappeared
Posted: Wed Dec 14, 2016 6:07 pm
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.
Re: Dashboards Disappeared
Posted: Thu Dec 15, 2016 11:04 am
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?
Re: Dashboards Disappeared
Posted: Thu Dec 15, 2016 11:11 am
by avandemore
Re: Dashboards Disappeared
Posted: Thu Dec 15, 2016 2:05 pm
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.
Re: Dashboards Disappeared
Posted: Thu Dec 15, 2016 2:41 pm
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
Re: Dashboards Disappeared
Posted: Thu Dec 15, 2016 5:24 pm
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....
Re: Dashboards Disappeared
Posted: Thu Dec 15, 2016 5:43 pm
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.
Re: Dashboards Disappeared
Posted: Thu Dec 15, 2016 5:59 pm
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?
Re: Dashboards Disappeared
Posted: Fri Dec 16, 2016 3:06 pm
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.