You can use the configure-metrics command of the VMware Cloud Director cell management tool to configure the set of metrics to collect.
VMware Cloud Director can collect metrics that provide current and historic information about the virtual machine performance and resource consumption. Use this subcommand to configure the metrics that VMware Cloud Director collects. Use the cell-management-toolcassandra subcommand to configure an Apache Cassandra database for use as a VMware Cloud Director metrics repository. See Configuring a Cassandra Metrics Database in VMware Cloud Director.
Procedure
Example: Configuring a Metrics Database Connection
This example configures the metrics collection as specified in the file /tmp/metrics.groovy.
[root@cell1 /opt/vmware/vcloud-director/bin]# ./cell-management-tool configure-metrics --metrics-config /tmp/metrics.groovy
The VMware Cloud Director metrics collection service implements a subset of the metrics collected by the vSphere Performance Manager. See the vSphere Performance Manager documentation for more information about metric names and collection parameters. The metrics-config file cites one or more metric names and provides collection parameters for each cited metric. For example:
configuration { metric("cpu.usage.average") metric("cpu.usagemhz.average") metric("cpu.usage.maximum") metric("disk.used.latest") { currentInterval=300 historicInterval=300 entity="VM" instance="" minReportingInterval=1800 aggregator="AVERAGE" } }
The following metric names are supported.
Metric Name |
Description |
---|---|
|
Host view of this virtual machine's average actively used CPU as a percentage of total available. Includes all cores in all sockets. |
|
Host view of this virtual machine's average actively used CPU as a raw measurement . Includes all cores in all sockets. |
|
Host view of this virtual machine's maximum actively used CPU as a percentage of total available. Includes all cores in all sockets. |
|
Memory used by this virtual machine as a percentage of total configured memory. |
|
Storage space allocated to this virtual hard disk in the containing organization virtual data center. |
|
Storage used by all virtual hard disks. |
|
Average read rate for all virtual hard disks. |
|
Average write rate for all virtual hard disks. |
When a virtual machine has multiple disks, VMware Cloud Director reports metrics as an aggregate for all disks. CPU metrics are an aggregate of all cores and sockets.
For each named metric, you can specify the following collection parameters.
Parameter Name |
Value |
Description |
---|---|---|
|
Integer number of seconds |
The interval in seconds to use when querying for the latest available metric values for current metrics queries. The default value is |
|
Integer number of seconds |
The interval in seconds to use when querying for historic metric values. The default value is |
|
One of: |
The type of VC object that the metric is available for. The default is |
|
A vSphere Performance Manager |
Indicates whether to retrieve data for individual instances of a metric, for example, individual CPU cores, an aggregate of all instances, or both. A value of |
|
Integer number of seconds |
Specifies a default aggregation interval in seconds to use when reporting time series data. Provides further control over reporting granularity when the granularity of the collection interval is not sufficient. The default is |
|
One of: |
The type of aggregation to perform during the |