Retrieve VM Disk Usage operation


The Retrieve VM Disk Usage operation retrieves the sum of the data read and written for all of the disk instances of the host or virtual machine. Results returned are for average, minimum, and maximum, and are expressed in Kbps.

The following table describes the elements for this request.

Adapter request elements for the Retrieve VM Disk Usage operation

Element

Definition

Required

<operation-type>

Defines the type of the operation: Monitor_Vm

Yes

<operation-name>

Defines the name of the operation: Retrieve_VM_Disk_Usage

Yes

<soap-url>

Specifies the URL for the remote SOAP service running on the VMware VirtualCenter

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Warning

Note

If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If the <transport> element is not provided, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Warning

Note

If the value of the <transport> element is https-rpc, you must install the security certificate for the VMware Virtual Center to the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center

If no user name is specified, the request is executed with the user name that is specified in the configuration.

No

<password>

Specifies the password corresponding to <user-name>

Conditional; required if <user-name> is specified

<parameters>

Contains the elements required to execute the operation

Yes

<virtual-machine>

Contains the name of the virtual machine whose disk usage details are to be retrieved

Yes

<interval-id>

Specifies the real-time sampling period, in seconds, for the performance statistics
This element is the same as the refresh rate of the provider which can be verified from the Performance tab in the VMware VirtualCenter client.

Yes

The following code sample shows a sample adapter request for the Retrieve VM Disk Usage operation.

Sample adapter request for the Retrieve VM Disk Usage operation

<vmware-infrastructure-request>
     <operation-type>Monitor_Vm</operation-type>
     <operation-name>Retrieve_VM_Disk_Usage</operation-name>
<soap-url></soap-url>                    
    <transport></transport>
     <user-name></user-name>
     <password></password>
     <parameters>
         <virtual-machine>TestDev</virtual-machine>
         <query-spec>
             <interval-id>20</interval-id>
         </query-spec>
     </parameters>
</vmware-infrastructure-request>

The following code sample shows the response for the sample Retrieve VM Disk Usage operation.

Sample adapter response for the Retrieve VM Disk Usage operation

<vmware-infrastructure-response>
     <metadata>
          <status>success</status>
     </metadata>
     <RetrieveVMDiskUsageResponse>
          <PerfEntityMetric>
               <VirtualMachine>TestDev</VirtualMachine>
                    <sampleInfo>
                         <timestamp>2008-01-01T14:00:59Z</timestamp>
                         <interval>20</interval>
                    </sampleInfo>
                    <PerfMetricIntSeries>
                         <id>
                         <counterId>88</counterId>
                         <instance/>
                         <key>88</key>
                         <nameInfo>
                         <label>Disk Usage(Average/Rate)</label>
                         <summary>Aggregated storage performance statistics. For hosts this can be represented on a per Virtual Machine basis as a stacked graph</summary>
                         <key>usage</key>
                         </nameInfo>
                         <groupInfo>
                              <label>Disk</label>
                              <summary>Disk</summary>
                              <key>disk</key>
                         </groupInfo>
                         <unitInfo>
                              <label>KBps</label>
                              <summary>Kilobytes per second</summary>
                              <key>kiloBytesPerSecond</key>
                         </unitInfo>
                         <rollupType>average</rollupType>
                         <statsType>rate</statsType>
                         </id>
                         <value>0</value>
                    </PerfMetricIntSeries>
          </PerfEntityMetric>
     </RetrieveVMDiskUsageResponse>
</vmware-infrastructure-response>

The following table describes the response elements.

Adapter response element for the Retrieve VM Disk Usage operation

Element

Definition

<sampleInfo>

Information of samples collected in the list.

<value>

Metric values corresponding to the samples collected in the list.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 23.1