Check mysql backup

Hi all,

we have mysql backups running daily via cronjob and mysql backup script. I would like to monitor if mysql backups are success or not with icinga. Please let me know how can i check.

Thanks

Hi,

the easiest way is to send a passive check result to the icinga api. As text you can use something “backup is ok” or “backup thrown error x”. And to handle something like timeouts, you can configure your service in that way, that it should also check if something is received in a certain period of time.

First of all, tell us how you would check manually for whether the backup
worked correctly or not.

As we have not seen your backup script, we have no idea what output it
produces or what information is available to indicate success vs. failure.

However, some suggestions which come to mind:

  1. Check the date on the backup file. More than 24 hours old indicates a
    problem.

  2. Check the size of the backup file. Less than indicates a problem.

  3. Check the content of the backup log file. Any message indicating failure is
    a problem.

Regards,

Antony.

But to check this also we need script i guess

You need a script for anything.

If you follow Stevie’s suggestion for a passive service check, this could be
the same script as does the backup.

Antony.