Skip to content

Instantly share code, notes, and snippets.

@hjbotha
hjbotha / check_backups.sh
Last active November 8, 2021 13:37
Submit Synology backup task results to Icinga
#! /bin/bash -e
# This script searches HyperBackup or ActiveBackup logs to determine
# the last time a specified backup task completed successfully
# That timestamp is then submitted to Icinga along with an OK
# if the task was completed within the last number of hours
# specified by the -w value, WARNING if between the values of
# -w and -c, and CRITICAL for values over that.
# If no value is given for -w it will be set to -c.
# For that submission to work, the following have to be true: