Page 2 of 2
Re: MySQL Database backup warning
Posted: Thu Jan 19, 2017 4:48 pm
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.
Re: MySQL Database backup warning
Posted: Tue Jan 31, 2017 2:35 pm
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
Re: MySQL Database backup warning
Posted: Tue Jan 31, 2017 2:42 pm
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
Re: MySQL Database backup warning
Posted: Tue Jan 31, 2017 2:46 pm
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?
Re: MySQL Database backup warning
Posted: Tue Jan 31, 2017 4:13 pm
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
Re: MySQL Database backup warning
Posted: Tue Feb 28, 2017 3:40 pm
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 ?
Re: MySQL Database backup warning
Posted: Tue Feb 28, 2017 4:55 pm
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.