Page 1 of 1

Dashboards sans frontiers

Posted: Mon Jul 25, 2016 3:21 pm
by eloyd
I seem to have a dashboard problem. I had a blank one for some reason. I tried deleting it. I ended up with two blank ones. I tried editing it to give it a name (asdf) so I could delete it. Then I had asdf plus three blank dashboards. So I tried making a new one and adding stuff to it and deleting it. Now I have a dozen or so blanks and still have asdf.

I can't delete any of them and they seem to believe they are bunnies as far as procreation goes. Thoughts?
Capture.PNG

Re: Dashboards sans frontiers

Posted: Mon Jul 25, 2016 4:38 pm
by Box293
Fresh XI 5 install ?

Does /var/log/mysqld.log show any errors?

Re: Dashboards sans frontiers

Posted: Mon Jul 25, 2016 4:42 pm
by eloyd
No, this was a 5.2 (I think) box that has been fully upgraded over time.

No MySQL errors.

Re: Dashboards sans frontiers

Posted: Mon Jul 25, 2016 4:54 pm
by Box293

Re: Dashboards sans frontiers

Posted: Mon Jul 25, 2016 4:59 pm
by ssax
Does this server use postgresql or is only using mysql?

Code: Select all

grep pgsql /usr/local/nagiosxi/html/config.inc.php
If it finds anything it's using postgresql as well, ignore the lines below and let us know.


If it's only using mysql, please run this command to check the table field length:

Code: Select all

echo "desc xi_usermeta keyname;" | mysql -uroot -pnagiosxi nagiosxi
If it's just TEXT or a varchar(255), please run this command to stop it from occurring again:

Code: Select all

echo "alter table xi_usermeta modify keyvalue LONGTEXT;" | mysql -uroot -pnagiosxi nagiosxi

I tried this method with another customer and it was able to recover what it could, you can try it if you'd like otherwise we would need to delete what is in there.

First, take an XI backup just in case:

Code: Select all

https://assets.nagios.com/downloads/nagiosxi/docs/Backing-Up-And-Restoring-Nagios-XI.pdf
Then run these commands:

Code: Select all

service nagios stop
service ndo2db stop
service httpd stop
wget https://raw.githubusercontent.com/Blogestudio/Fix-Serialization/master/fix-serialization.php
mysqldump -uroot -pnagiosxi nagiosxi xi_usermeta > xi_usermeta.sql
cp xi_usermeta.sql xi_usermeta.sql.orig
php fix-serialization.php xi_usermeta.sql
mysql -uroot -pnagiosxi nagiosxi < xi_usermeta.sql
service httpd start
service ndo2db start
service nagios start
Then check the dashboards to see if they are working.

Run these commands ONLY IF THERE ARE ISSUES AND YOU WANT TO put the original data back:

Code: Select all

service nagios stop
service ndo2db stop
service httpd stop
mysql -uroot -pnagiosxi nagiosxi < xi_usermeta.sql.orig
service httpd start
service ndo2db start
service nagios start
Let us know the results.

Re: Dashboards sans frontiers

Posted: Mon Jul 25, 2016 5:01 pm
by eloyd
Fixed it. Thanks. I forgot about postgres still being in 5.2.

Guess it's time for a new install, because I really hate postgres. :-)

Edit: Steve, you posted way too much information while I was postgres vacuuming. :-) Vaccum solved it:

Code: Select all

echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgres
service postgresql restart

Re: Dashboards sans frontiers

Posted: Mon Jul 25, 2016 5:03 pm
by ssax
Steve? I posted it for posterity, I just pulled most of it from a ticket I had.

Re: Dashboards sans frontiers

Posted: Mon Jul 25, 2016 5:10 pm
by eloyd
Sean. Sorry. Sean. I went to school with a Steve Saxx so it's habit. :)

Close.

Re: Dashboards sans frontiers

Posted: Tue Jul 26, 2016 9:34 am
by mcapra
Closing this