When you retrieve a subset of current or historic metrics, you can specify the metrics by name, or by using a pattern that includes a wildcard character.
Metric Names
Metric names are dot-separated strings.
Metric Name | Type | Unit | Description |
---|---|---|---|
cpu.usage.average |
rate | percent | Host view of this virtual machine's average actively used CPU as a percentage of total available. Includes all cores in all sockets. |
cpu.usagemhz.average |
rate | megahertz | Host view of this virtual machine's average actively used CPU as a raw measurement . Includes all cores in all sockets. |
cpu.usage.maximum |
rate | percent | Host view of this virtual machine's maximum actively used CPU as a percentage of total available. Includes all cores in all sockets. |
mem.usage.average |
absolute | percent | Memory used by this virtual machine as a percentage of total configured memory. |
disk.provisioned.latest |
absolute | kilobytes | Storage space allocated to this virtual hard disk in the containing organization virtual data center. |
disk.used.latest |
absolute | kilobytes | Storage used by all virtual hard disks. |
disk.read.average |
rate | kilobytes per second | Average read rate for all virtual hard disks. |
disk.write.average |
rate | kilobytes per second | Average write rate for all virtual hard disks. |
Metric Patterns
disk
.
<MetricPattern>disk.*</MetricPattern>The response would include these metric names:
disk.provisioned.latest
,
disk.used.latest
,
disk.read.average
, and
disk.write.average
.
disk
and end with
average
.
<MetricPattern>disk.*.average</MetricPattern>The response would include the metric names
disk.read.average
and
disk.write.average
.
Metric Series Expected Intervals and Timestamps
A HistoricUsage element includes zero or more MetricSeries elements, each of which includes a set of Sample elements. Each MetricSeries has an expectedInterval attribute that specifies the interval, in milliseconds, at which the samples in the series are reported. Each Sample in the MetricSeries has a timestamp attribute noting the absolute time at which the sample was taken. You can use the timestamp and expectedInterval values to aggregate sample data, and to determine when metrics became unavailable because the virtual machine was powered off or unreachable.
Specifying Collection Start and End Times
A HistoricUsageSpec can include a time specification that constrains the result set to metrics collected between a start time and an end time. This time specification can be relative or absolute.
interval
unit
s ago. For example, this
HistoricUsageSpec requests metrics collected during the past 8 hours.
<HistoricUsageSpec xmlns="http://www.vmware.com/vcloud/v1.5"> <RelativeStartTime interval="8" unit="hour"/> <RelativeEndTime interval="0" unit="hour"/> ... </HistoricUsageSpec>You can also write this specification with no RelativeEndTime element, rather than a RelativeEndTime with an interval attribute value of
0
. Both constructions specify an end time of now.
<HistoricUsageSpec xmlns="http://www.vmware.com/vcloud/v1.5"> <AbsoluteStartTime time="2013-11-13T10:00:00.000Z" /> <AbsoluteEndTime time="2013-11-13T11:00:00.000Z" /> ... </HistoricUsageSpec>