Hi
I was running Nagios Xi for few years
Had Database Corruption , After repair (screenshot attached ) the Nagios Xi web Page asking for install .Please see the Attached screenshot
What can be the Issue and how can I get it fixed
Database got corrupt , Once repaired , asking install
-
biswajit.banerjee
- Posts: 152
- Joined: Fri Dec 08, 2017 10:24 pm
Database got corrupt , Once repaired , asking install
You do not have the required permissions to view the files attached to this post.
Re: Database got corrupt , Once repaired , asking install
The table that holds the server activation may still be corrupted so follow this process to stop everything, clean the temporary data and start up the processes.
Run all of it as root. Adjust the MYSQL password as needed.
Let the system run for 5 minutes and then login to the XI GUI to see if it still wants you to finish the installation.
Run all of it as root. Adjust the MYSQL password as needed.
Code: Select all
service npcd stop
service nagios stop
service ndo2db stop
service crond stop
pkill -9 -u nagios
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -u root -pnagiosxi nagiosxi
mysqlcheck -f -r -u root -pnagiosxi --all-databases --use-frm
if grep --quiet pgsql /usr/local/nagiosxi/html/config.inc.php; then service postgresql stop; fi;
service mysqld restart
rm -f /usr/local/nagios/var/rw/nagios.cmd
rm -f /usr/local/nagios/var/nagios.lock
rm -f /var/run/nagios.lock
rm -f /usr/local/nagios/var/ndo.sock
rm -f /usr/local/nagios/var/ndo2db.lock
rm -f /var/lib/mrtg/mrtg_l
rm -f /usr/local/nagiosxi/var/*.lock
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
pkill python
if grep --quiet pgsql /usr/local/nagiosxi/html/config.inc.php; then service postgresql start; fi;
service httpd restart
service ndo2db start
service nagios start
service npcd start
service crond startBe sure to check out our Knowledgebase for helpful articles and solutions!
-
biswajit.banerjee
- Posts: 152
- Joined: Fri Dec 08, 2017 10:24 pm
Re: Database got corrupt , Once repaired , asking install
After Attempting the mentioned steps , The Nagios Xi GUI Is still prompting for install
Please let me know the Further Steps to diagnose and Resolve .
Please let me know the Further Steps to diagnose and Resolve .
Re: Database got corrupt , Once repaired , asking install
At this point, you have 2 options, it you have access to a backup from before the corruption, you can restore to that is hopefully is will have all of the required settings.
Or, finish the installation of the server so you can login to it and check all of the settings and re-setup the server if needed.
Or, finish the installation of the server so you can login to it and check all of the settings and re-setup the server if needed.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
biswajit.banerjee
- Posts: 152
- Joined: Fri Dec 08, 2017 10:24 pm
Re: Database got corrupt , Once repaired , asking install
I could Restore the Xi_option table and proceed . I could Login now but in CCM the hosts and services are missing as attached
Can you please guide .
Can you please guide .
You do not have the required permissions to view the files attached to this post.
Re: Database got corrupt , Once repaired , asking install
Go in to the Core Config Manager > Configuration Snapshots menu and if there is a snapshot available from before the corruption, restore the configs using that.
Else, in a backup file is the nagiosql.sql database file, you can use that to restore the database that holds the configurations for the CCM which you can use to restore.
Extract a backup file and in the extracted folder is a mysql folders. In there is th nagiosql.sql file you can use to restore the database.
Run this to restore the configurations from the extracted backups.
Else, in a backup file is the nagiosql.sql database file, you can use that to restore the database that holds the configurations for the CCM which you can use to restore.
Extract a backup file and in the extracted folder is a mysql folders. In there is th nagiosql.sql file you can use to restore the database.
Run this to restore the configurations from the extracted backups.
Code: Select all
mysql -u root -pnagiosxi <nagiosql.sqlBe sure to check out our Knowledgebase for helpful articles and solutions!
-
biswajit.banerjee
- Posts: 152
- Joined: Fri Dec 08, 2017 10:24 pm
Re: Database got corrupt , Once repaired , asking install
Thanks for your Support .
We have restored the nagiosql database .
Thanks
We have restored the nagiosql database .
Thanks
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Database got corrupt , Once repaired , asking install
Great!biswajit.banerjee wrote:Thanks for your Support .
We have restored the nagiosql database .
Thanks
Locking thread