VMware Cloud Community
AintKing
Contributor
Contributor
Jump to solution

VCOPS CustomReports MetricKeys

Hello World!

I have a problem to create an own custom report with VCOPS.

My target ist to list the VM's witch are using high CPU, Memory and DiskIO Ressources.

For this i should use Metric Keylike cpu_usage|usage. But its an invalid MetricKey.

Only the MetricKey with badge like badge|health are working, but for me not intressting.

Is it possible to solve this problem? Or are only the Metrics with Badge supportet?

Thx!

Reply
0 Kudos
1 Solution

Accepted Solutions
Alexander_Dimi1
Hot Shot
Hot Shot
Jump to solution

Here is one geeky way to find the actual metric name:

How to find metric keys available for user custom forwarding

  • Look for the metrics available in VCOps-vSphere/Operations/AllMetrics tab
  • Find the metric keys Most of the metrics available for forwarding are described in the vSphere adapter describe.xml file (search in the AnalyticsVM for describe.xml)
  • Example:
    • Open VCOps-vSphere UI
    • Select a cluster;
    • go to AllMetrics tab;
    • expand "Memory" group
    • double click on "Shared".
    • Note the metric name under the chart: "Memory | Shared (KB)"
    • find the name in describe.xml: <Name key="83" shortname="Shared Common (KB)">
    • find namekey="83" substring: <ResourceAttribute key="sharedcommon_average" namekey="83" ...
    • note that the above <ResourceAttribute> node is under <ResourceGroup key="mem"
    • Compose the target metric key to be forwarded in pipe notation:
    • mem|sharedcommon_average
    • put the metric key into user_ciq_metrics_collected.xml for cluster:
<metric key="mem|sharedcommon_average" scale="KILO" unit="BYTES" type="UTILIZATION">
     <res_kinds_to_collect>     
          <res_kind_to_collect>ClusterComputeResource</res_kind_to_collect>
     </res_kinds_to_collect>
</metric>

View solution in original post

Reply
0 Kudos
10 Replies
Matrix_1970
Enthusiast
Enthusiast
Jump to solution

Hi,

what are the steps you do?

Matrix

Reply
0 Kudos
AintKing
Contributor
Contributor
Jump to solution

First I created the xml file and after that I runed the command vcops-viewsreports file.xml create.

Failure: InvalidMeasureMetricNameException

Reply
0 Kudos
Matrix_1970
Enthusiast
Enthusiast
Jump to solution

Can you attach the XML file. I try to found the "errors".

Matrix

Reply
0 Kudos
AintKing
Contributor
Contributor
Jump to solution

Here the .xml file. The .xsd file is the orginal from VMware and is located in the same directory.

Reply
0 Kudos
Alexander_Dimi1
Hot Shot
Hot Shot
Jump to solution

I think that you have two things to solve.

  1. The metric key - in your case the correct metric key is cpu|demandmhz or cpu|demandPct
  2. Planning (capacity) portion of VCOps product (that backs up the reporting engine) should get this metric (it is used currently only in operations part, not in planning part).

Here starts the complicated part: You should add a section describing the metric you want to forward to planning part in a file named: sys_ciq_metrics_collected.xml or user_ciq_metrics_collected.xml. Those files are located at /usr/lib/vmware-vcops/user/conf/analytics (both on UI VM and Analytics VM). For your case you should add something like this in one of those files (on both VMs):


<metric key="cpu|demandmhz" scale="NORMAL" unit="DATA" type="OTHER">

  <res_kinds_to_collect>
    <res_kind_to_collect>VirtualMachine</res_kind_to_collect>
  </res_kinds_to_collect>
</metric>

Then restart vcops ("vcops-admin restart" from the console).

Now report creation should succeed.

Thanks,

Alex D.



AintKing
Contributor
Contributor
Jump to solution

Thanks!

Now the Report creation was successful. But in the PDF i see only "-". Smiley Sad I used cpu|demandmhz

And how are the Metrics for Memory usage and Disk IO?

UPDATE:

with the metricKey cpu|usagemhz_average it works... But i want the actual value. Is a list with all MetricKeys available?

Reply
0 Kudos
ZachV
Contributor
Contributor
Jump to solution

You can perform quick searches via the "Health-Workload" widget by selecting the "Workload" radio button and typing within the search field.

Alternatively, please see the below for querying the VCOPs database:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=201171...

Reply
0 Kudos
AintKing
Contributor
Contributor
Jump to solution

I have the VCOPS Advanced.

Reply
0 Kudos
Alexander_Dimi1
Hot Shot
Hot Shot
Jump to solution

Here is one geeky way to find the actual metric name:

How to find metric keys available for user custom forwarding

  • Look for the metrics available in VCOps-vSphere/Operations/AllMetrics tab
  • Find the metric keys Most of the metrics available for forwarding are described in the vSphere adapter describe.xml file (search in the AnalyticsVM for describe.xml)
  • Example:
    • Open VCOps-vSphere UI
    • Select a cluster;
    • go to AllMetrics tab;
    • expand "Memory" group
    • double click on "Shared".
    • Note the metric name under the chart: "Memory | Shared (KB)"
    • find the name in describe.xml: <Name key="83" shortname="Shared Common (KB)">
    • find namekey="83" substring: <ResourceAttribute key="sharedcommon_average" namekey="83" ...
    • note that the above <ResourceAttribute> node is under <ResourceGroup key="mem"
    • Compose the target metric key to be forwarded in pipe notation:
    • mem|sharedcommon_average
    • put the metric key into user_ciq_metrics_collected.xml for cluster:
<metric key="mem|sharedcommon_average" scale="KILO" unit="BYTES" type="UTILIZATION">
     <res_kinds_to_collect>     
          <res_kind_to_collect>ClusterComputeResource</res_kind_to_collect>
     </res_kinds_to_collect>
</metric>
Reply
0 Kudos
AintKing
Contributor
Contributor
Jump to solution

Now it Works! Perfect Thank you!

Is that correct, that datastore|datastoreIops_average only work with vCenter 4.1?

Reply
0 Kudos