Add-AzMetricAlertRule PowerShell命令中缺少信号类型参数

问题描述 投票:0回答:1

我想通过powershell添加新的度量标准警报规则,但缺少命令中的某些参数。例如,如果我想配置信号类型,如何传递参数?

Add-AzMetricAlertRule -Name -地点 -ResourceGroup - 运算符 -TargetResourceId -MetricName -TimeAggregationOperator Total -WindowSize -Description -Action

Configure Signal types

azure azure-application-insights
1个回答
0
投票

您可以在参数-MetricName中设置信号类型,如下所示:

Add-AzMetricAlertRule -Name name -Location yourLocation -ResourceGroupName yourGroup -Operator GreaterThan -MetricName "Percentage CPU" -Threshold 0.1 -WindowSize 00:05:00 -TargetResourceId yourVMResourceId -TimeAggregationOperator Total

但这是经典的警报规则。我没有找到PowerShell命令来创建新的警报规则。但您可以在门户中或通过Azure CLI command创建新的警报规则。见difference between Old and New alert

© www.soinside.com 2019 - 2024. All rights reserved.