[英]Azure Log Analytics workspace alert rule giving bad gateway error while disabling alert rule using Azure powershell
我正在嘗試使用以下 powershell 命令禁用目標資源 LogAnalytics 工作區的 Azure 警報規則,
Update-AzScheduledQueryRule -ResourceGroupName $ResourceGroupName -Name $AlertRuleName -Enabled $false
但得到以下錯誤:
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)
錯誤的請求錯誤太板了,您可以使用Fiddler
來捕獲詳細的錯誤消息。我在我的站點上進行了測試,它運行良好。 更多詳情,請參閱鏈接。
Update-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" -Name "LogAlertRule1" -Enabled $false
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.