diff --git a/roles/backup-vm/ths_cal_backup.sh b/roles/backup-vm/ths_cal_backup.sh new file mode 100644 index 0000000..c8dc170 --- /dev/null +++ b/roles/backup-vm/ths_cal_backup.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +BACKUP_NAME=backup_$(date +%Y%m%d).zip +mkdir -p ~/ths_caldav_backups/ +vdirsyncer -c vsyncdir.conf sync +zip -q -r ~/ths_caldav_backups/${BACKUP_NAME} ~/ths-caldav +~/backups/backup-tools/backup_manager.py ~/ths_caldav_backups/ --debug + +curl -H "Content-Type: application/json" \ + -X POST https://async-icinga.atlantishq.de/ \ + -d '{ "service" : "ths_caldav_backup", "token" : "HISTORY_PURGED_SECRET", "status" : "OK", "info" : "" }' diff --git a/roles/monitoring-master/files/services_async.conf b/roles/monitoring-master/files/services_async.conf index 5a430e8..6e2515a 100644 --- a/roles/monitoring-master/files/services_async.conf +++ b/roles/monitoring-master/files/services_async.conf @@ -171,3 +171,12 @@ apply Service "mail_atlantishq" { vars.service_name = "mail_atlantishq" assign where host.name == "async_icinga" } + +apply Service "ths_caldav_backup" { + import "generic-service" + check_command = "gateway" + vars.protocol = "https" + vars.host = "async-icinga.atlantishq.de" + vars.service_name = "ths_caldav_backup" + assign where host.name == "async_icinga" +}