共用方式為


New-AzScheduledQueryRuleLogMetricTrigger

建立記錄計量觸發程式類型的物件

語法

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

Description

建立 Log Metric Trigger 類型的物件,而且是選擇性的。 這是計量查詢規則的觸發條件,當您需要狀態計量測量類型的警示時使用。

範例

範例 1

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

參數

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租使用者和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-MetricColumn

正在匯總計量值的資料行

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-MetricTriggerType

計量觸發程式類型

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Threshold

計量臨界值

類型:Double
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ThresholdOperator

計量臨界值運算子:GreaterThan、LessThan、Equal

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

輸入

None

輸出

PSScheduledQueryRuleLogMetricTrigger