@@ -93,12 +93,12 @@ def __init__(
9393 # label names and ammount will be needed later to insert labels from custom attributes
9494 self ._labelNames = {
9595 'vms' : ['vm_name' , 'host_name' , 'dc_name' , 'cluster_name' ],
96- 'vm_perf' : ['vm_name' , 'host_name' , 'dc_name' , 'cluster_name' ],
96+ 'vm_perf' : ['vm_name' , 'host_name' , 'dc_name' , 'cluster_name' , 'unit' ],
9797 'vmguests' : ['vm_name' , 'host_name' , 'dc_name' , 'cluster_name' ],
9898 'snapshots' : ['vm_name' , 'host_name' , 'dc_name' , 'cluster_name' ],
9999 'datastores' : ['ds_name' , 'dc_name' , 'ds_cluster' ],
100100 'hosts' : ['host_name' , 'dc_name' , 'cluster_name' ],
101- 'host_perf' : ['host_name' , 'dc_name' , 'cluster_name' ],
101+ 'host_perf' : ['host_name' , 'dc_name' , 'cluster_name' , 'unit' ],
102102 }
103103
104104 # if tags are gonna be fetched 'tags' will be a label too
@@ -1387,7 +1387,7 @@ def _vmware_get_vm_perf_manager_metrics(self, vm_metrics):
13871387 for ent in results :
13881388 for metric in ent .value :
13891389 vm_metrics [metric_names [metric .id .counterId ]].add_metric (
1390- labels [ent .entity ._moId ],
1390+ labels [ent .entity ._moId ] + [ content . perfManager . QueryPerfCounter ([ metric . id . counterId ])[ 0 ]. unitInfo . label ] ,
13911391 float (sum (metric .value )),
13921392 )
13931393
@@ -1472,7 +1472,7 @@ def _vmware_get_host_perf_manager_metrics(self, host_metrics):
14721472 for ent in results :
14731473 for metric in ent .value :
14741474 host_metrics [metric_names [metric .id .counterId ]].add_metric (
1475- labels [ent .entity ._moId ],
1475+ labels [ent .entity ._moId ] + [ content . perfManager . QueryPerfCounter ([ metric . id . counterId ])[ 0 ]. unitInfo . label ] ,
14761476 float (sum (metric .value )),
14771477 )
14781478
0 commit comments