Get-OMStat Command | Vmware PowerCLI Reference

Get-OMStat

This cmdlet retrieves statistical data from the specified VMware Aria Operations server.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
Resource OMResource[] named
  • pipeline
Specifies the VMware Aria Operations resource you want to retrieve statistical data for.
optional From DateTime named
Specifies the start of the time interval to retrieve statistical data for.
optional IntervalCount Int32 named
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.
optional IntervalType OMStatIntervalType named
Specifies the aggregation interval length.
optional Key OMStatKey[] named
  • wildcards
Specifies the keys of the statistic counters you want data for. If a specified key is not applicable to the specified VMware Aria Operations resource, that key is skipped.
optional ProgressAction ActionPreference named
optional RollupType OMStatRollupType named
Specifies the type of aggregation when specifying aggregation interval.
optional Server OMServer[] named
Specifies the VMware Aria Operations 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.
optional To DateTime named
Specifies the end of the time interval to retrieve statistical data for.

Output

VMware.VimAutomation.vROps.Types.V1.OMStatSample

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.

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.

Related Commands

OMStat

This cmdlet retrieves statistical data from the specified VMware Aria Operations server.

OMStatKey

This cmdlet retrieves VMware Aria Operations statistic keys.