Modifier

Partager via


Measure-AzAlertStatistic

Gets Alert Summary Information

Syntax

Measure-AzAlertStatistic
       -GroupBy <String>
       [-TargetResourceType <String>]
       [-TargetResourceGroup <String>]
       [-MonitorService <String>]
       [-MonitorCondition <String>]
       [-Severity <String>]
       [-State <String>]
       [-AlertRuleId <String>]
       [-TimeRange <String>]
       [-CustomTimeRange <String>]
       [-IncludeSmartGroupsCount <Boolean>]
       [-DefaultProfile <IAzureContextContainer>]
       [<CommonParameters>]
Measure-AzAlertStatistic
       -GroupBy <String>
       -TargetResourceId <String>
       [-MonitorService <String>]
       [-MonitorCondition <String>]
       [-Severity <String>]
       [-State <String>]
       [-AlertRuleId <String>]
       [-TimeRange <String>]
       [-CustomTimeRange <String>]
       [-IncludeSmartGroupsCount <Boolean>]
       [-DefaultProfile <IAzureContextContainer>]
       [<CommonParameters>]

Description

Measure-AzAlertStatistic cmdlet gets alert summary details.

Examples

Example 1

Measure-AzAlertStatistic -GroupBy "severity,alertstate" -State "Active"

Summarize alerts count grouped by severity and state filtered by Active state.

Parameters

-AlertRuleId

Filter on Alert Rule Id

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CustomTimeRange

Supported format - <start-time>/<end-time> where time is in ISO-8601 format

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GroupBy

Summarize by property

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-IncludeSmartGroupsCount

Include SmartGroups Count

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MonitorCondition

Filter on Monitor Condition

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MonitorService

Filter on Moniter Service

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Severity

Filter on Severity of alert

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-State

Filter on State of alert

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetResourceGroup

Filter on Resource group name of the target resource of alert.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetResourceId

Filter on Resource Id of the target resource of alert.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TargetResourceType

Filter on Resource type of the target resource of alert.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TimeRange

Supported time range values - 1h, 1d, 7d, 30d (Default is 1d)

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSAlertsSummary