shinken icon indicating copy to clipboard operation
shinken copied to clipboard

vmware_discovery_runner.py : vm name are case sensitives

Open srtxg opened this issue 8 years ago • 0 comments

Hello,

A little bug in the vmware_discovery_runner.py file. The VM names on an ESX server are case sensitive (at least on the servers I have access to); so lowercasing it is a problem. The shinken "host_name" entry, however, is informative, and lowercasing it is ok.

near line 150:

@@ -151,7 +152,7 @@
             # First we apply rules on the names
             vm_name = _apply_rules(vm, rules)
             #v = (('host', host_name),('host', vm_name))
-            print "%s::vmname=%s" % (vm_name, vm_name)
+            print "%s::vmname=%s" % (vm_name, vm)
             print "%s::isesxvm=1" % vm_name
             print "%s::esxhost=%s" % (vm_name, host_name)
             #r.append(v)

Thanks

srtxg avatar Aug 29 '16 09:08 srtxg