I
I
Igor2020-03-15 15:19:06
Backup
Igor, 2020-03-15 15:19:06

How to monitor zabbix database backup?

The bottom line is that every day a backup of the database is made and lie in a directory by type

123.11-03-20.sql.gz
231.11-03-20.sql.gz
323.11-03-20.sql.gz

How can I monitor backups through Zabbix of this particular format?
Maybe someone has a ready-made script?
Thanks in advance.
PS tell us how you monitor database backups.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mureevms, 2020-03-15
@whitegtr

I'm not sure there are ready-made solutions. I would do so. From simple to complex. Not all items are required. You can only do the first check, everything is possible. All items are fairly easy to script.
1. Checking the existence of a file. We know at what time the backup is made, so we can check for the existence of a file within the specified limits by the time of creation, or filter by the date mask.
2. Check for non-zero and adequate size. It is known that the archived dump weighs, for example, 10MB, then the check will be compliance that the file is not less than these 10MB.
3. Check for readability. You need to unzip the file to check if it is broken.
4. Checking the existence of actual data inside the file. Warm up the file for the existence of some occurrences in it.
5. Checking the deployment of the dump on a separate SQL instance or database.
4 and 5 are dubious, since the first three are sufficient in most cases.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question