This template use SQL Query to discover VEEAM Backup jobs, Veeam BackupCopy, Veeam BackupSync, Veeam Tape Job, Veeam FileTape, Veeam Agent, Veeam Replication, All Repositories. Powershell get all informations via SQL and send it to zabbix server/proxy with json.
- Work with Veeam backup & replication V9 to V10 and V11 (actually ok on 11.0.1.1261)
- Work with Zabbix 6.x
- Total number of VEEAM jobs
- Master Item for Veeam jobs and repository Informations
- [WARNING] => No data in RepoInfo
- [WARNING] => No data on Jobs
- Result
- Progress
- Last end time
- Last run time
- Last job duration
- If failed Job : Last Reason
- If failed : Is retry ?
- Remaining space in repository
- Total space in repository
- Percent free space
- Out of date
- [HIGH] => Job has FAILED
- [HIGH] => Job has FAILED (With Retry)
- [AVERAGE] => Job has completed with warning
- [AVERAGE] => Job has completed with warning (With Retry)
- [HIGH] => Job is still running (8 hours)
- [HIGH] => Less than 20% remaining on the repository
- [HIGH] => Information is out of date
-
Install the Zabbix agent 2 on your host.
-
Connect to the veeam sql server, adjust protocols for VEEAMSQL in "Sql Server Configuration Manager" for permit to connect with TCP/IP
-
With SQL Server Management Studio : Create User/Pass with reader rights , permit to connect with local user in sql settings and specify the default database. With sqlcmd.exe (Change password "CHANGEME" with something more secure):
USE [VeeamBackup] CREATE LOGIN [zabbixveeam] WITH PASSWORD = N'CHANGEME', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF; CREATE USER [zabbixveeam] FOR LOGIN [zabbixveeam]; EXEC sp_addrolemember 'db_datareader', 'zabbixveeam'; GO
-
In script, ajust variables line 73 to 78 to match your configuration
-
Copy
zabbix_vbr_job.ps1
in the directory :C:\Program Files\Zabbix Agent 2\scripts\
(create folder if not exist) -
Add
UserParameter=veeam.info[*],powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent 2\scripts\zabbix_vbr_job.ps1" "$1"
in zabbix_agent2.conf -
Import Template_Veeam_Backup_And_Replication.yaml file into Zabbix.
-
Associate Template "VEEAM Backup and Replication" to the host.
NOTE: When importing the new template version on an existing installation please check all "Delete missing", except "Template linkage", to make sure the old items are deleted
Ajust Zabbix Agent & Server/Proxy timeout for userparameter, you can use this powershell command to determine the execution time :
(Measure-Command -Expression{ & "C:\Program Files\Zabbix Agent 2\scripts\zabbix_vbr_job.ps1" "StartJobs"}).TotalSeconds