zabbix_export: version: '7.0' template_groups: - uuid: cd6848345eb04289b2d5260c10e0d269 name: devloop templates: - uuid: 0ae56f6a7bc94b48891d4aa22e16c0d4 template: 'Template Borg Backup Active' name: 'Borg Backup Active' description: 'Check the last Borg Backup Archive, Visualize the sizes and checks if the backup older than one day' vendor: name: devloop version: '1.0' groups: - name: devloop items: - uuid: 767935b5d6304e2d8abf2b8ae81c176a name: 'Borg Archives Duration' type: DEPENDENT key: borg.duration delay: '0' history: 90d value_type: FLOAT units: s preprocessing: - type: JSONPATH parameters: - '$.archives[0].duration' master_item: key: 'vfs.file.contents[/tmp/borg.json]' tags: - tag: Application value: Backup triggers: - uuid: 1edb990e68cd4774a54a687d0e665ddb expression: 'last(/Template Borg Backup Active/borg.duration)>{$BORG_BACKUP_CREATE_TIMEOUT}' name: 'Borg Backup takes to long ({$BORG_BACKUP_CREATE_TIMEOUT})' priority: WARNING description: 'Check why, this should not normal. Only for the first backup.' manual_close: 'YES' - uuid: 18a28e85e3994bf4be1625c131525ea1 name: 'Borg Archives End Time' type: DEPENDENT key: borg.endtime delay: '0' history: 90d units: unixtime preprocessing: - type: JSONPATH parameters: - '$.archives[0].end' - type: JAVASCRIPT parameters: - | var datum = Date.parse(value); return datum/1000; - type: DISCARD_UNCHANGED parameters: - '' master_item: key: 'vfs.file.contents[/tmp/borg.json]' tags: - tag: Application value: Backup triggers: - uuid: ab4fce53507145a39d207a7500ad231c expression: 'last(/Template Borg Backup Active/borg.endtime)48h)' priority: HIGH description: 'Backup ist zu alt!' manual_close: 'YES' - uuid: 7aa227f7fb804db6b999a736ab472c71 name: 'Borg Archives Hostname' type: DEPENDENT key: borg.hostname delay: '0' history: 90d value_type: TEXT trends: '0' preprocessing: - type: JSONPATH parameters: - '$.archives[0].hostname' - type: DISCARD_UNCHANGED parameters: - '' master_item: key: 'vfs.file.contents[/tmp/borg.json]' tags: - tag: Application value: Backup - uuid: a0ddfc714a6940489efc01277b2aa206 name: 'Borg Archives Name' type: DEPENDENT key: borg.name delay: '0' history: 90d value_type: TEXT trends: '0' preprocessing: - type: JSONPATH parameters: - '$.archives[0].name' - type: DISCARD_UNCHANGED parameters: - '' master_item: key: 'vfs.file.contents[/tmp/borg.json]' tags: - tag: Application value: Backup - uuid: f0002944e5c44fddad366690011c239a name: 'Borg Archives Stats Compressed Size' type: DEPENDENT key: borg.stats.compressedsize delay: '0' history: 90d units: b preprocessing: - type: JSONPATH parameters: - '$.archives[0].stats.compressed_size' master_item: key: 'vfs.file.contents[/tmp/borg.json]' tags: - tag: Application value: Backup - uuid: 96fd6a922d66499ba9b7c6db1e2c4ae4 name: 'Borg Archives Stats Deduplicated Size' type: DEPENDENT key: borg.stats.deduplicated_size delay: '0' history: 90d units: b preprocessing: - type: JSONPATH parameters: - '$.archives[0].stats.deduplicated_size' master_item: key: 'vfs.file.contents[/tmp/borg.json]' tags: - tag: Application value: Backup - uuid: 51d34f6bc162424bbe6867e2469c0ba9 name: 'Borg Archives Stats Number Files' type: DEPENDENT key: borg.stats.nfiles delay: '0' history: 90d preprocessing: - type: JSONPATH parameters: - '$.archives[0].stats.nfiles' master_item: key: 'vfs.file.contents[/tmp/borg.json]' tags: - tag: Application value: Backup - uuid: 8eba451c79a14d74922b2144f81df926 name: 'Borg Archives Stats Original Size' type: DEPENDENT key: borg.stats.original_size delay: '0' history: 90d units: b preprocessing: - type: JSONPATH parameters: - '$.archives[0].stats.original_size' master_item: key: 'vfs.file.contents[/tmp/borg.json]' tags: - tag: Application value: Backup - uuid: 752052a6e898406cbf136a36856a024d name: Borg.Json type: ZABBIX_ACTIVE key: 'vfs.file.contents[/tmp/borg.json]' delay: 2h history: 2d value_type: TEXT trends: '0' description: 'Get the last archive as JSON' - uuid: 8d594ca9d98c40cfaf91ba276d20beaa name: 'Borg Json File Exists' type: ZABBIX_ACTIVE key: 'vfs.file.exists[/tmp/borg.json]' delay: 2h history: 90d tags: - tag: Application value: Backup - uuid: f1a2e23b87024ccfb630bd72b1e0d929 name: 'Borg Json File Size' type: ZABBIX_ACTIVE key: 'vfs.file.size[/tmp/borg.json]' delay: 2h history: 90d tags: - tag: Application value: Backup macros: - macro: '{$BORG_BACKUP_CREATE_TIMEOUT}' value: 15m description: 'Maximal Duration of creating the Backup in Minutes' triggers: - uuid: 167b925b72b14095bffc297acfd70a75 expression: 'last(/Template Borg Backup Active/vfs.file.exists[/tmp/borg.json],#2)=0 or last(/Template Borg Backup Active/vfs.file.size[/tmp/borg.json])<200' name: 'Check Borg Result File' priority: WARNING description: 'Check if backup script is executed via cron and created a status file with relevant information in json format' manual_close: 'YES' graphs: - uuid: 77a4bb2baacc4886800509954bd4b28b name: 'Backup Archive Size' show_triggers: 'NO' ymin_type_1: FIXED graph_items: - color: 42A5F5 item: host: 'Template Borg Backup Active' key: borg.stats.compressedsize - sortorder: '1' color: 1B5E20 item: host: 'Template Borg Backup Active' key: borg.stats.deduplicated_size - sortorder: '2' color: FF0000 item: host: 'Template Borg Backup Active' key: borg.stats.original_size - uuid: 6f229b97476543a9bfb769a7fa4f5645 name: 'Backup Duration' ymin_type_1: FIXED graph_items: - color: 1A7C11 item: host: 'Template Borg Backup Active' key: borg.duration - uuid: e1735b27eee9446ab6a37dfeb52afa80 name: 'Backuped Files' ymin_type_1: FIXED graph_items: - color: 1A7C11 item: host: 'Template Borg Backup Active' key: borg.stats.nfiles