PowerCLI Reference

Get-OMStat

Synopsis

This cmdlet retrieves statistical data from the specified vRealize Operations Manager server.

Syntax

Get-OMStat [-Resource] <OMResource[]> [-From <DateTime>] [-IntervalCount <Int32>] [-IntervalType <OMStatIntervalType>] [-Key <OMStatKey[]>] [-RollupType <OMStatRollupType>] [-Server <OMServer[]>] [-To <DateTime>] [<CommonParameters>]

Related Commands

Online Version

Detailed Description

This cmdlet retrieves statistical data from the specified vRealize Operations Manager server.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ResourceOMResource[]Specifies the vRealize Operations Manager resource you want to retrieve statistical data for.trueTrue (ByValue)
FromDateTimeSpecifies the start of the time interval to retrieve statistical data for.falseFalse
IntervalCountInt32Specifies the multiplier for the aggregation interval length. For example, if IntervalType is WEEKS and IntervalCount is 2, the aggregation interval length is two weeks.falseFalse
IntervalTypeOMStatIntervalTypeSpecifies the aggregation interval length.falseFalse
KeyOMStatKey[]Specifies the keys of the statistic counters you want data for. If a specified key is not applicable to the specified vRealize Operations Manager resource, that key is skipped.falseFalse
RollupTypeOMStatRollupTypeSpecifies the type of aggregation when specifying aggregation interval.falseFalse
ServerOMServer[]Specifies the vRealize Operations Manager server from which you want to retrieve alerts. The value can be the connection object returned by the Connect-OMServer cmdlet or the object's name, which can be the IP or DNS address of the server machine.falseFalse
ToDateTimeSpecifies the end of the time interval to retrieve statistical data for.falseFalse

Return Type

Zero or more OMStatSample objects

Notes

Examples

-------------------------- Example 1 --------------------------

Get-OMStat -Resource 'HostIPorDNS' -Key 'cpu|usage_average'

Retrieves all available raw CPU usage data for a specified host.

-------------------------- Example 2 --------------------------

$startDate = Get-Date "MM/DD/YYYY"
$endDate = Get-Date "MM/DD/YYYY"
Get-OMStat -Resource 'MyResource' -Key 'badge|health' -IntervalType 'Months'  -IntervalCount '2'  -RollupType 'Avg' -From $startDate -To $endDate

Retrieves a collection of statistical samples for a given resource, metric, aggregation, and interval.


Note: Make sure the specified IntervalType and IntervalCount fit in the chosen time interval between $startDate and $endDate.

-------------------------- Example 3 --------------------------

Get-OMStat -Resource 'MyVmResource' -Key 'mem|usage_average' -From ([DateTime]::Now).AddMonths(-3)

Retrieves all available memory usage data for the last three months.


Copyright © VMware, Inc. All rights reserved.