PowerCLI Reference

Get-OMStat

Synopsis

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

Syntax

Get-OMStat [-Resource] <OMResource[]> [-Key <OMStatKey[]>] [-From <DateTime>] [-To <DateTime>] [-IntervalType <OMStatIntervalType>] [-IntervalCount <Int32>] [-RollupType <OMStatRollupType>] [-Server <OMServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<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
InformationActionActionPreferencefalsefalse
InformationVariableStringfalsefalse
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
PipelineVariableStringfalsefalse
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.