Check IML backup server

Script: check_iml_backup_server

This check is for IML Backup server. This check executes the script ‘storage_helper.sh’ to get thebackup status.

see https://os-docs.iml.unibe.ch/iml-backup-server/

Requirements

There can be a permission issue to reach the storage-helper script or while reading the backup target dirs. On our servers the backup target is using a user imlbackup. To give access to its resources we added the group “imlbackup” for icinga

$ id icingaclient
uid=1041(icingaclient) gid=1041(icingaclient) groups=1041(icingaclient),1031(imlbackup)
                                                                             ^
                                                                             |
                                additional group for icinga client user -----+

Standalone installation

From this repository ypu need next to this script:

  • inc_pluginfunctions shared function for all IML checks written in bash

Syntax

______________________________________________________________________

CHECK_IML_BACKUP_SERVER
v1.1

(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3

https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_iml_backup_server.html
______________________________________________________________________

Show status of backup server.
You can get the count of connections or the status of server backup.

See https://os-docs.iml.unibe.ch/iml-backup-server/

SYNTAX:

  check_iml_backup_server [-d DIRECTORY] -m MODE

OPTIONS:

  -h, --help
      show this help.

  -d, --dir PATH
      set installation dir of iml deployment to find its check skript
      default dir: /opt/imlbackup/server
      script: /opt/imlbackup/server/storage_helper.sh

  -m, --mode MODE
      mode: set type of result; one of status|backupstatus
        backupstatus  status of backup sets of all servers
        status        count of connected servers

EXAMPLE:

  check_iml_backup_server -m status 
  check_iml_backup_server -m backupstatus 

Examples

Backup server status

# ./check_iml_backup_server -m backupstatus
OK: Server Backups - 36 servers in backup - 0 errors - 7 disbled - 0 running
List of server backups grouped by status (non-OK only)

  server                                        : start                : end                  : duration :  rc : age [h] : size 

D oldserver.example.com                         : 2023-10-17 23:06:29  : 2023-10-17 23:11:05  :      276 :   0 :    1554 : 199G /netshare/restic-backup/oldserver.example.com
(...) 

  server                                        : start                : end                  : duration :  rc : age [h] : size 

 |notstarted=0;;;0;36 disabled=7;;;0;36 ok=29;;;0;36 running=0;;;0;36 error=0;;;0;36