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 versionDetailed Description
This cmdlet retrieves statistical data from the specified vRealize Operations Manager server.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Resource | OMResource[] | Specifies the vRealize Operations Manager resource you want to retrieve statistical data for. | true | true (ByValue) | |
From | DateTime | Specifies the start of the time interval to retrieve statistical data for. | false | false | |
InformationAction | ActionPreference | false | false | ||
InformationVariable | String | false | false | ||
IntervalCount | Int32 | Specifies the multiplier for the aggregation interval length. For example, if IntervalType is WEEKS and IntervalCount is 2, the aggregation interval length is two weeks. | false | false | |
IntervalType | OMStatIntervalType | Specifies the aggregation interval length. | false | false | |
Key | OMStatKey[] | 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. | false | false | |
PipelineVariable | String | false | false | ||
RollupType | OMStatRollupType | Specifies the type of aggregation when specifying aggregation interval. | false | false | |
Server | OMServer[] | 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. | false | false | |
To | DateTime | Specifies the end of the time interval to retrieve statistical data for. | false | false |
Return Type
Zero or more OMStatSample objectsNotes
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.