zabbix_export: version: '6.0' date: '2021-11-21T22:04:39Z' groups: - uuid: cdce88f4196c45bfa225b57ddba7445e name: 'Halley template' templates: - uuid: 9331e388d8fb418884ecf7a27cc4ac79 template: 'Halley Synology NAS Backup' name: 'Halley Synology NAS Backup' description: | ## Description Is the template for the service NAS Backup. Will contain only items for discover and monitor de NAS backup instances ## Overview All processes are described here: https://github.com/tudorticau/Synology-Backup-LLD-Monitor First step: setup syslogserver Second: configure zabbix to monitor using LLD All is tested and already implemented on production: over 40 NAS Template have 1 item and 1 trigger, but is LLD - this mean you don't have to take care how your admins will add and name the backup processes: all is done automatically ## Author Tudor Ticau groups: - name: 'Halley template' discovery_rules: - uuid: 52f2523f59eb43728dd349f5b822594f name: 'BACKUP: Backup tasks' key: 'backup[{$NAS.IP}]' delay: 1d description: 'Discover backup tasks with the script from /var/log/remotelog/synobackup.sh' item_prototypes: - uuid: e33edb6a6e534a8f8db5de1d3766409f name: 'Backup "{#BPNAME}" status' key: 'backupt[{$NAS.IP},{#BPNAME}]' delay: '{$BPERIOD1}' trends: '0' value_type: LOG description: 'Monitor the backup {#BPNAME} status and return date and task status. This backup is configured to be done every {$BPERIOD1}' tags: - tag: Application value: Backup trigger_prototypes: - uuid: f3305402eeb54568ac461963162426d1 expression: 'find(/Halley Synology NAS Backup/backupt[{$NAS.IP},{#BPNAME}],#1,"like","Failed to run backup task")=1 or find(/Halley Synology NAS Backup/backupt[{$NAS.IP},{#BPNAME}],#1,"like","Backup task was cancelled")=1' name: 'Backup "{#BPNAME}" has an error' priority: HIGH description: | Backup "{#BPNAME}" has an error. Maybe the new backup was not done or has been completed with errors. Check the status of backup configured by Backup or HyperBackup utility NAS IP: {$NAS.IP} Backup "{#BPNAME}" is done every: {$BPERIOD1} manual_close: 'YES' tags: - tag: Value value: '{ITEM.VALUE}' macros: - macro: '{$BPERIOD1}' value: 1d - macro: '{$BPERIOD2}' value: 1d - macro: '{$BPERIOD3}' value: 1d - macro: '{$NAS.IP}' value: '{HOST.IP2}' - macro: '{$SNMP_COMMUNITY}' value: MonitorZabbix