romainsi / zabbix-VEEAM_B-R

52 stars 40 forks source link

DiscoveryBackupJob does not display Agent jobs #45

Closed Geqsogen closed 4 years ago

Geqsogen commented 4 years ago

Zabbix 4.0, Veeam 9.5u4

Does not show a Veeam Jobs with the use Agent. It is necessary to fix the following:

"DiscoveryBackupJobs" {
        $xml1 = ImportXml -item backupjob
        $query = $xml1 | Where-Object { $_.IsScheduleEnabled -eq "true" -and $_.JobType -like "Backup" } | Select-Object @{ N = "JOBID"; E = { $_.ID | convertto-encoding -switch in } }, @{ N = "JOBNAME"; E = { $_.NAME | convertto-encoding -switch in } }
        $query | ConvertTo-ZabbixDiscoveryJson JOBNAME, JOBID
    }

In line: $ _. JobType -like "Backup" Replaced by: ($ _. JobType -like "Backup" -or $ _. JobType -like "EpAgentBackup")

Otherwise finds only jobs with the VM

romainsi commented 4 years ago

Hi !

It's fixed ;)