dnaeon / py-vpoller

Distributed vSphere API Proxy
Other
84 stars 31 forks source link

Renaming VM in vcenter results in no change for VM in Zabbix #209

Closed PhAzE-Variance closed 6 years ago

PhAzE-Variance commented 7 years ago

I've noticed that when a VM is renamed in vCenter, the hos tin Zabbix is not changed. Also, the new hostname is not picked up during the import script and loaded into Zabbix until the original host in Zabbix is deleted first.

I'm not sure how vpoller import script does the matching between hosts in vCenter with hosts in Zabbix, but is it possible to have it update the hostname if it detects a change in vCenter?

dnaeon commented 7 years ago

Cannot test this myself at the moment, but if you are using the discovery rules the old VM should be removed automatically when it's gone.

As for the import script it should report which VMs exist in Zabbix, but are not present in the vCenter.

It does that looking at the Zabbix Macro for vCenter host in the respective Zabbix host.

dnaeon commented 6 years ago

Using the zabbix-vsphere-import tool helps with these issues.