diff --git a/docs/20_Checks/_index.md b/docs/20_Checks/_index.md index 839ca53eaba1e5f82ea2c6f69cf8eb4328c41c8d..04adc02e6e43d8929d8c594dc1a4529b2139206b 100644 --- a/docs/20_Checks/_index.md +++ b/docs/20_Checks/_index.md @@ -40,6 +40,7 @@ There is one include script used by all checks: * check_proc_ressources * check_proc_zombie * [check_psqlserver](check_psqlserver.md) +* [check_rearbackup](check_rearbackup.md) * [check_reboot_required](check_reboot_required.md) * check_requirements * check_sensuplugins diff --git a/docs/20_Checks/check_rearbackup.md b/docs/20_Checks/check_rearbackup.md new file mode 100644 index 0000000000000000000000000000000000000000..c718824289b193b212513100b609402f678d389b --- /dev/null +++ b/docs/20_Checks/check_rearbackup.md @@ -0,0 +1,89 @@ +# Check Rear backup + +## Introduction + +This check can verify the age of all iso files in the backup target directory. + +## Requirements + +There can be a permission issue to reach the backup target directory. +On our servers the backup target is using a user *imlbackup*. To give access to its resources we added the group "imlrear" for icinga. + +```txt +$ id icingaclient +uid=1041(icingaclient) gid=1041(icingaclient) groups=1041(icingaclient),1056(imlrear) + ^ + | + additional group for icinga client user -----+ +``` + +## Syntax + +```txt +______________________________________________________________________ + +CHECK_REARBACKUP +v1.0 + +(c) Institute for Medical Education - University of Bern +Licence: GNU GPL 3 + +https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_rearbackup.html +______________________________________________________________________ + +Check if iso files of rear backup are not out of date. +You can customize the values for +* backup directory +* limits for warning and critical + +This plugin sends performancedata. + +SYNTAX: + + check_rearbackup [-h] [--dir PATH] [--critical VALUE] [--warning VALUE] + +OPTIONS: + + -h, --help + this help + +PARAMETERS: + + -d, --dir PATH + set installation dir of iml deployment to find its check skript + default dir: /rearshare/rear-backup + + -c, --critical VALUE + critical level in days (default: 14) + + -w. --warning VALUE + warning level in days (default: 7) + +EXAMPLE: + + check_rearbackup + Check backup data with initial values + + check_rearbackup -d /data/mybackups + Check iso files a given directory + + check_rearbackup -d /data/mybackups -w 14 -c 28 + Check iso files a given directory and customized limits + +``` + +## Examples + +### Rear backup status + +```txt +# ./check_rearbackup +CRITICAL: Rear backup /rearshare/rear-backup - 20 total - 0 critical (7 d) .. 2 warnings (14 d) .. 18 OK + +All iso files in alphabetic order: +OK 4 d #### -rw-rw-r--. 1 imlrear imlrear 3907082240 Dec 17 10:28 /rearshare/rear-backup/admin/admin.example.com_backup.iso +OK 5 d ##### -rw-rw-r--. 1 imlrear imlrear 573384704 Dec 16 18:07 /rearshare/rear-backup/awx/awx.example.com_backup.iso +(...) + +|ok=18;;;0;20 warning=2;;;0;20 critical=0;;;0;20 +```