⚠️ Note: This integration has been tested only on Debian-based operating systems (e.g., Debian, Ubuntu). Use on other distributions may require adjustments.
Agent-based monitoring of UrBackup client backups:
- Reads structured JSON file (e.g.,
/var/log/urbackup-backups.json) - Uses Low-Level Discovery (LLD) to detect UrBackup clients
- Monitors backup state, last backup time, backup size, and connectivity
- Triggers if backups are outdated or failed
- JSON-formatted backup log generated by UrBackup client
- Log file must be accessible by the Zabbix agent (active mode)
- Template must be applied to the host where the file is available
sudo apt-get update && sudo apt-get install -y sqlite3 jqThis script generates the JSON log file that the Zabbix template reads and analyzes.
Download it directly from GitHub:
sudo curl -o /usr/local/bin/backup_report_json.sh https://raw.githubusercontent.com/Garfieldttt/zabbix-urbackup-template/zabbix/7.0/backup_report_json.shsudo chmod +x /usr/local/bin/backup_report_json.shAdd a line to the crontab of a user with access to the backup log (e.g., root):
sudo crontab -eFor example, run it every 5 minutes (for testing; later consider changing to */5):
*/5 * * * * /usr/local/bin/backup_report_json.sh| Macro | Default Value | Description |
|---|---|---|
{$BACKUP_TRIGGER_ENABLED_ISSUES} |
1 |
Enables or disables the backup monitoring trigger. Set to 1 to activate the trigger, or 0 to disable it. |
{$BACKUP_TRIGGER_ENABLED_NO_BACKUP} |
1 |
Enables or disables the backup monitoring trigger. Set to 1 to activate the trigger, or 0 to disable it. |
Name: BACKUP-STATE
| Value | Meaning |
|---|---|
| 0 | No recent backup |
| 1 | Ok |
| 2 | Completed with issues |
| 3 | Failed |
Name: CONNECTIVITY-STATE
| Value | Meaning |
|---|---|
| 0 | Offline |
| 1 | Online |
- urbackup.raw
Key:vfs.file.contents[/var/log/urbackup-backups.json]
Type: ZABBIX_ACTIVE
Purpose: Reads raw UrBackup data from local JSON log
backup.connectivity[{#CLIENT}]– Online/offline statebackup.last.backup[{#CLIENT}]– Unix timestamp of last backupbackup.state[{#CLIENT}]– Backup state (OK, failed, etc.)backup.total.size[{#CLIENT}]– Backup size in MB
All dependent items use JSONPath preprocessing to extract data from the raw log.
Efficient template for monitoring UrBackup clients through local JSON log files.
Ideal for environments where direct API access is not available.
Fully supports dynamic client discovery, detailed backup insights, and trigger customization.