VMware Cloud Community
Souad90
Enthusiast
Enthusiast

VM Attribute : Number of virtual disks issue

Hello,

 

In the creation of a super metric window, I choose the VM as the object, then I have two sections of metrics: one on the right for attributes and the left one for usual metrics.

I wanted to have in my dashboard a scoreboard that shows how many a VM has of virtual disks, so I copy the name of the attribute from the creation window and paste it in my XML file. The issue is that the attribute always gives 0 as a result, for all the VMs the number of virtual disk is 0. Is that normal? Also, why I can't use attributes in a view ? what's an attribute??

 

Thanks a lot.

0 Kudos
9 Replies
sxnxr
Commander
Commander

Paste what you have in your xml file.

0 Kudos
Souad90
Enthusiast
Enthusiast

<?xml version="
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AdapterKinds>
  <AdapterKind adapterKindKey="VMWARE">
   <ResourceKind resourceKindKey="VirtualMachine">
  <Metric attrkey="diskspace|numvmdisk" />
  </ResourceKind>
  </AdapterKind>
</AdapterKinds>
1.0" encoding="UTF-8" standalone="yes"?>

<AdapterKinds>

  <AdapterKind adapterKindKey="VMWARE">

   <ResourceKind resourceKindKey="VirtualMachine">

  </ResourceKind>

  </AdapterKind>

</AdapterKinds>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<AdapterKinds>

  <AdapterKind adapterKindKey="VMWARE">

   <ResourceKind resourceKindKey="VirtualMachine">

   

<Metric attrkey="diskspace|numvmdisk" />

  

   </ResourceKind>

  </AdapterKind>

</AdapterKinds>

0 Kudos
sxnxr
Commander
Commander

It is the correct key. This is the one I ues

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

  <AdapterKinds>

     <AdapterKind adapterKindKey="VMWARE">

  <ResourceKind resourceKindKey="VirtualMachine">

                  <Metric attrkey="config|hardware|num_Cpu" label="Configured vCPU" unit="" yellow="255" orange="256" red="257" />

                  <Metric attrkey="mem|guest_provisioned" label="Configured Memory" unit="" yellow="99999999" orange="100009999" red="100019999" />

                  <Metric attrkey="summary|parentCluster" label="Parent Cluster" unit="" yellow="9999" orange="10000" red="10001" />

                  <Metric attrkey="summary|parentVcenter" label="Parent vCenter" unit="" yellow="15" orange="30" red="40" />

                  <Metric attrkey="config|hardware|disk_Space" label="Configured Disk Space" unit="" yellow="99997" orange="99998" red="99999" />

                 <Metric attrkey="diskspace|numvmdisk" label="Number of Disks" unit="" yellow="99999" orange="9999999" red="99999999" />

                 <Metric attrkey="diskspace|snapshot" label="Snapshot Space Used" unit="" yellow="20" orange="30" red="40" />

</ResourceKind>

     </AdapterKind>

  </AdapterKinds>

My Dashboard uses an object list that is the source for the scoreboard. and it works great. Try copying it in and see if it gives you the same error

pastedImage_1.png

0 Kudos
Souad90
Enthusiast
Enthusiast

It's the same thing for me : I have a list of VMs and its related to the scoreboard with the interactions. But all I have when I click on any VM is a blue box with "?" mark on it.

I'll check again and let you know. Thank you very much.

0 Kudos
sxnxr
Commander
Commander

You could try and create a scoreboard that is its own provider for a vm and see if it brings back the number of disks. that should then point to a problem with the metric or the xml

Check you policy to make sure the metric is enabled (Inherited under state ticked)

pastedImage_0.png

0 Kudos
Souad90
Enthusiast
Enthusiast

I could have done that and test with a single VM without any XML but the attribute is not in the list of metrics when configuring the scoreboard. 

So I created a super metric from it, and when i test I get 0 as a result.

Also, the attribute is correctly enabled within the policy.

 

I also have a curious question if you allow me: in your screenshot, I see a column of production/non production. Is that a vShpere tag?

Thanks again.

0 Kudos
sxnxr
Commander
Commander

If you created a supermetric and want to use it in the XML there are two steps to take. The first is to enable it in you policy. By default all SM's are not enabled. The second thing is you need to use the SM uid in the xml not the metric in the SM. The easiest way to find that is once it is enabled create a dashboard (scoreboard would do) select a vm and then the SM. once that is done export the dashboard and edit the file in notepad ++ or something and close to the bottom you will get the UID for the SM. One thing to consider is if the base metric's in the SM are not visible to the VM as in your case I dont think the SM will return anything. It looks like for some reason that metric is not being collected for that object and I know you checked but points back to not being enabled in the policy.

I am not sure why it is not visible as I have never had a problem with it below is from a scoreboard

pastedImage_0.png

The production /non production column is the name of the policy attached to that object. We use an allocation based capacity modes and have 4 different environments that had different capacity ratios so each policy has different settings.

0 Kudos
Souad90
Enthusiast
Enthusiast

The super metric I created is in fact enabled in the policy too. I take the ID just by exporting the super metric.

Capture.PNG

0 Kudos
Souad90
Enthusiast
Enthusiast

Any idea?

0 Kudos