vmware_exporter icon indicating copy to clipboard operation
vmware_exporter copied to clipboard

[Feature] vmware_datastore_freespace_size and vmware_datastore_capacity_size indicator cannot obtain the IP address of the exsi host where it is located

Open ilanni2460 opened this issue 3 years ago • 10 comments

[BUG]vmware_datastore_freespace_size and vmware_datastore_capacity_size indicator cannot obtain the IP address of the exsi host where it is located

2 1

ilanni2460 avatar Nov 17 '21 06:11 ilanni2460

I would check the host metrics Typically volumes are provided by a vsan, nas, or nas. I'm not sure we can help with the identification of those.

pryorda avatar Nov 17 '21 18:11 pryorda

@pryorda I want to describe the host IP address of exsi in the alarm content in the rules of prometheus, but the vmware_datastore_freespace_size metic have not host_name lables

ilanni2460 avatar Nov 19 '21 02:11 ilanni2460

@pryorda I don't know how to do it, can you help me, tks

ilanni2460 avatar Nov 19 '21 02:11 ilanni2460

We are also using local storage on some of our ESXi boxes and i would also like to see the hostname as a label of the datastore. I think it makes sense to provide this output, or? Can't you determined based on the storage type if its a local storage or network storage?

vmware_vm_guest_tools_version_status{cluster_name="",dc_name="ha-datacenter",ds_name="ssd2",host_name="myhost.company.com,tools_version_status="guestToolsUnmanaged",vm_name="testmachine"} 1.0
# HELP vmware_datastore_capacity_size VMWare Datasore capacity in bytes
# TYPE vmware_datastore_capacity_size gauge
vmware_datastore_capacity_size{dc_name="ha-datacenter",ds_cluster="",ds_name="datastore1"} 710548652032.0
vmware_datastore_capacity_size{dc_name="ha-datacenter",ds_cluster="",ds_name="ssd1"} 1199638052864.0
vmware_datastore_capacity_size{dc_name="ha-datacenter",ds_cluster="",ds_name="ssd2"} 1199638052864.0

image

Regards Stephan

phreakadelle avatar Dec 08 '21 09:12 phreakadelle

I am now seeing the value of adding this. Thanks. We will need to inspec the data that gets passed back to vmware_exporter and add a label.

pryorda avatar Dec 09 '21 22:12 pryorda

@pryorda @phreakadelle Thank you, I look forward to the realization of this feature

ilanni2460 avatar Dec 10 '21 00:12 ilanni2460

@pryorda @phreakadelle When will this function be implemented, we need it very much, thank you

ilanni2460 avatar Oct 14 '22 05:10 ilanni2460

Greetings! Is there any update on this issue? We also would like to have the ip address as a label for the vm metrics

tqi-raurora avatar Jan 19 '23 02:01 tqi-raurora

Maybe this will help someone, we had the same need and created a fork for this. I created a PR here: https://github.com/pryorda/vmware_exporter/pull/357

tqi-raurora avatar Jan 24 '23 17:01 tqi-raurora

Sorry for the delayed responses on this. I would like to get this implemented as I do find value. @tqi-raurora would you be able to update the tests for this and then ill see about getting a merge in?

pryorda avatar Feb 03 '23 17:02 pryorda