MySQL Database backup warning

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: MySQL Database backup warning

Post by tgriep »

In the nagiosxi cron tab file, these 2 lines are used to backup the mysql databases and the Postgres databases.

Code: Select all

0 7 * * * root /root/scripts/automysqlbackup
0 7 * * * root /root/scripts/autopostgresqlbackup > /dev/null 2>&1
An older XI system will use both databases like your system and that is normal.

The 2 MYSQL databases the XI process uses is nagios and nagiosql so the changes dwhitfield had you do will only backup the databases that are needed.
The problem is that the script was trying to backup a table that isn't needed by us so not backing up that mysql table will stop the email warning from happening.
Be sure to check out our Knowledgebase for helpful articles and solutions!
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: MySQL Database backup warning

Post by absarcompass »

Hi Guys,
Previous warning message was gone but today I have received this warning

###### WARNING ######
Errors reported during AutoMySQLBackup execution.. Backup failed Error log below..
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.

I have checked the /root/scripts/automysqlbackup and it still has DBNAMES="nagios nagiosql"
Since it is the same Warning which was appearing previously, can anyone suggest something here now
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: MySQL Database backup warning

Post by dwhitfield »

Did it go away on it's own, or after you ran through the repair db kb? If you did not run through it, please do so.

For the sake of completeness, the rest of that post was as follows (plus a version iteration)
If it fixes things, please monitor your email to see if the problem still persists. Let us know if it does.

You didn't mention what version you're on, but if you haven't upgraded to 5.4.1 you should consider doing so. After your DB is in good condition, you may also consider doing this:

https://support.nagios.com/kb/article.php?id=560
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: MySQL Database backup warning

Post by absarcompass »

Is it was on its own. And my NagiosXI version is 5.3.3
so i may go throng the DB fix first then opt for the upgrade?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MySQL Database backup warning

Post by rkennedy »

Yes - the upgrade will fail if your database is crashed. Use this script to repair it if needed -

Code: Select all

/usr/local/nagiosxi/scripts/repair_databses.sh
Former Nagios Employee
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: MySQL Database backup warning

Post by absarcompass »

Hi Guys,
I had run through the database repair procedure successfully and was not getting any warnings in daily database backup email notification but today I have received the warning again
###### WARNING ######
Errors reported during AutoMySQLBackup execution.. Backup failed Error log below..
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
is there any thing that we are missing here ?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: MySQL Database backup warning

Post by mcapra »

As long as the backup was still physically created (in /store/backups by default), that warning should be fine to ignore. We don't use any MySQL events/triggers for Nagios XI anyway.
Former Nagios employee
https://www.mcapra.com/
Locked