From b1aad63955463524d3f818b994a6f094beff56b6 Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Fri, 7 Jan 2022 11:22:20 +0100 Subject: [PATCH] update --- Monitoring.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Monitoring.md diff --git a/Monitoring.md b/Monitoring.md new file mode 100644 index 0000000..c9310c3 --- /dev/null +++ b/Monitoring.md @@ -0,0 +1,26 @@ +## Monitoring if zfs-autobackup succeeds + +On completion, zfs-autobackup returns an exit code: + +* `0`: Everything went fine, no important errors. +* `x`: Snapshotting was ok, but there are `x` datasets that aborted with a fatal error. +* `255`: Wrong options or other major failure, probably nothing succeeded. + +### Output + +Without `--verbose` or `--debug`, zfs-autobackup only echos (zfs) errors and warnings to stderr. Complete silence means everything is fine. + +If it detects a tty it will output progress updates to stdout. + + +## Monitoring example with Zabbix-jobs + +You can monitor backups by using my zabbix-jobs script. () + +Put this command directly after the zfs_backup command in your cronjob: + +```console +zabbix-job-status backup_smartos01_fs1 daily $? +``` + +This will update the zabbix server with the exit code and will also alert you if the job didn't run for more than 2 days.