Repair Nagios XI Databases

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Repair Nagios XI Databases

Post by sandeepatil »

Hi,

Want to know "repair_databases.sh" script, stop and start the database during repair.

If yes, looking for database table repair, connections, long and short query and DB I/O status check without restart DB on running DB.

Need you suggesting and all Nagios XI DB details.

Thanks.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Repair Nagios XI Databases

Post by tgriep »

Normally, when the repair script is run, it will restart the MYSQL database but in newer versions of XI, it will check and see if the database is offloaded and not try and restart it.

If you want to repair the MYSQL database and not restart the daemon, you could use this command to do that.

Code: Select all

mysqlcheck -f -r -u root -pnagiosxi --all-databases
You could run the MYSQL Wizard to monitor connections, long and short query and DB I/O status, on the MYSQL database that it running on the Nagios server itself.
Try that and if you have any more questions, let us know.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Repair Nagios XI Databases

Post by sandeepatil »

We are planning large environment with 20 Nagios XI servers and this not possible login in every server and check database status.

Need to develop the script to check check (Table status, Connections, Long and Short query and DB I/O status) in all serves database with timely manner and get alerts if any this wrong.

Linux having MYSQL Wizard ?, can you help for how to access the same.

Suggest how to manage and ensure all Nagios xi database (MariaDB, ndo2db and NagiosQL) are working fine.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Repair Nagios XI Databases

Post by dwhitfield »

sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Repair Nagios XI Databases

Post by sandeepatil »

Shared details not fulfill my requirement.

Writing script to manage database to check database periodically and update the status.

Query :

1] Database will down not working, if single table corrupted among all databases (mysql, nagios, nagiosql and nagiosxi) ?
2] Particulate tables crash will, will down not working ? if yes please provide table list.
3] Please share list or reasons of Nagios XI database crash.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Repair Nagios XI Databases

Post by dwhitfield »

1. It's possible for some things to work if there is a crashed table that is not in use.
2. It depends on what you are trying to do. Essentially, you need all of the databases to be functional to have a fully functional system.
3. Disk space issues, fiddling with the database, heavy load. Installing things like phpmyadmin tends to cause issues. Basically, anything that would make any mysql db crash could make the XI dbs crash.
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Repair Nagios XI Databases

Post by sandeepatil »

Yesterday we faced "nagios_servicestatus" table crashed, message showing on GUI, but DB data writing is working, also notification working, no major effect on DB and application. We repaired this table.

Need know which table crashed not affection on DB and Application.

Sorry for asking again same question, want to clear understanding of DB.

We configuring failover between primary and secondary server, failover depends on DB or DB table status also. Trying to finding when we run the failover.

So need to clear understanding about DB tables.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Repair Nagios XI Databases

Post by tgriep »

Unfortunately we don't have a document that outlines all of the MYSQL tables but to get true failover, you would have to sync them all.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Repair Nagios XI Databases

Post by sandeepatil »

Please close this thread.
kyang

Re: Repair Nagios XI Databases

Post by kyang »

Closing this thread. Feel free to create another thread if you have more questions!

Thanks for using the Nagios Support Forum!
Locked