Skip to content

Discovery of all VMs in Backup Job dosen't work properly. #48

Description

@usbpc

I have a Backup Job that is Setup to make a Backup of a whole vCenter Cluster and also Exclude one VM within that cluster.

Unfortunately this Script dosen't properly detect any of the VMs that are contained within that Backup Job.

The discovery item key that dosen't work properly is: vbr["DiscoveryBackupVmsByJobs"]

Looking through the Script it seems to be executing something about like this:

[Veeam.Backup.Core.CBackupJob]::GetAll() | Where-Object { $_.LogNameMainPart -eq "Backup Job - NAME"  } | Get-VBRJobObject | ForEach-Object { $_.Object.Type }

and adds it to Zabbix in case that Type is VM it adds it in Zabbix.

There are two problems, but one seems to be a Problem on Veeams side.

  1. The Cluster is Reported with Type "VM" in the place the script looks.
  2. The Excluded VM is added, since it has Type "VM".

The second Problem could be fixed if the script would also Consider:

[Veeam.Backup.Core.CBackupJob]::GetAll() | Where-Object { $_.LogNameMainPart -eq "Backup Job - NAME"  } | Get-VBRJobObject | ForEach-Object { $_.Type }

As the Values there seem to be either "Include" or "Exclude", it should only include VMs that are Included, not any that are Excluded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions