New-AzScheduledQueryRuleLogMetricTrigger

Creates an object of type Log Metric Trigger

Syntax

New-AzScheduledQueryRuleLogMetricTrigger
   -ThresholdOperator <String>
   -Threshold <Double>
   -MetricTriggerType <String>
   -MetricColumn <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Creates an object of type Log Metric Trigger and is optional. This is the trigger condition for metric query rule, to be used when you need to state metric measurement type of alert.

Examples

Example 1

PS C:\> $metricTrigger = New-AzScheduledQueryRuleLogMetricTrigger -ThresholdOperator "GreaterThan" -Threshold 5 -MetricTriggerType "Consecutive" -MetricColumn "Computer"

Parameters

-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MetricColumn

Column on which metric value is being aggregated

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

The metric trigger type

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

The metric threshold value

Type:Double
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ThresholdOperator

The metric threshold operator : GreaterThan, LessThan, Equal

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

Inputs

None

Outputs

Microsoft.Azure.Commands.Insights.OutputClasses.PSScheduledQueryRuleLogMetricTrigger