[英]Azure Log Analytics workspace alert rule giving bad gateway error while disabling alert rule using Azure powershell
I am trying to disable Azure alert rule with target resource LogAnalytics workspace using below powershell command,我正在尝试使用以下 powershell 命令禁用目标资源 LogAnalytics 工作区的 Azure 警报规则,
Update-AzScheduledQueryRule -ResourceGroupName $ResourceGroupName -Name $AlertRuleName -Enabled $false
But getting below error:但得到以下错误:
Exception type: Exception, Message: System.Exception: Error in updating Log Alert Rule ---> System.AggregateException: One or more errors occurred. ---> Microsoft.Azure.Management.Monitor.Models.ErrorResponseException: Operation returned an invalid status code 'BadGateway'
at Microsoft.Azure.Management.Monitor.ScheduledQueryRulesOperations.<UpdateWithHttpMessagesAsync>d__7.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
The bad request error is too board, you could use Fiddler
to catch the detailed error message.I test in my site and it works well.错误的请求错误太板了,您可以使用Fiddler
来捕获详细的错误消息。我在我的站点上进行了测试,它运行良好。 For more details, please refer to the link .更多详情,请参阅链接。
Update-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" -Name "LogAlertRule1" -Enabled $false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.