romainsi / zabbix-VEEAM_B-R

52 stars 40 forks source link

New copy job "Immediate copy (mirroring)" not detected #60

Open lekzz opened 2 years ago

lekzz commented 2 years ago

Veeam introduced a new copy job type which is not detected by the script: Immediate copy (mirroring) It seems they gave it a new jobtype: SimpleBackupCopyPolicy

To get it partially to work i changed the DiscoveryBackupSyncJobs switch item by adding an or function.

line 306 (version 3.7): $query = $xml1 | Where-Object { $_.IsScheduleEnabled -eq "true" -and ($_.JobType -like "BackupSync" -or $_.JobType -like "SimpleBackupCopyPolicy") } | Select-Object @{ N = "JOBBSID"; E = { $_.ID } }, @{ N = "JOBBSNAME"; E = { $_.NAME } }

This makes the job detectable by zabbix and works for the backup result status, however it doesn't return the correct number of VM's (0) but it seems this is because Get-VBRJobObject only lists excluded VM's and not included so this is something Veeam will need to fix.

Example: Get-VBRJobObject -Job "some backup"

Name Type ApproxSize Location VM1 GuestFS... 0 B 192.168.x.x\DOMAIN\19... VM2 GuestFS... 0 B 192.168.x.x\DOMAIN\19... ExcludedVM1 Exclude 0 B 192.168.x.x\DOMAIN\19... VM1 VssChild 0 B 192.168.x.x\DOMAIN\19... VMware vCenter Include 12,5 TB 192.168.x.x

Get-VBRJobObject -Job "some copy job"

Name Type ApproxSize Location ExcludedVM1 Exclude 0 B 192.168.x.x\DOMAIN\19... ExcludedVM2 Exclude 0 B 192.168.x.x\DOMAIN\19...

asm19 commented 1 year ago

Can you share your ps1, please?

lekzz commented 1 year ago

I have another job so no longer access to those systems.

But as said i just changed line 306 of the 3.7 release zip download to: $query = $xml1 | Where-Object { $_.IsScheduleEnabled -eq "true" -and ($.JobType -like "BackupSync" -or $.JobType -like "SimpleBackupCopyPolicy") } | Select-Object @{ N = "JOBBSID"; E = { $.ID } }, @{ N = "JOBBSNAME"; E = { $_.NAME } }