将NSG添加到日志分析工作区失败



试图将网络安全组添加到日志分析工作区,出现以下错误。这在5.0.0版本中曾经有效,但在5.0.1版本中不再有效。

Set-AzureRmDiagnosticSetting -ResourceId $NsgFrontendSubnet.Id -WorkspaceId $LogAnalyticsWorkspace.ResourceId -Enabled $true -Categories 'NetworkSecurityGroupEvent','NetworkSecurityGroupRuleCounter'

Set AzureRmDiagnosticsSetting:异常类型:ErrorResponseException,消息:诊断设置"服务"不存在。,代码:ResourceNotFound,状态代码:NotFound、原因短语:在PAT0056未找到NetworkSecurityGroupNew:764字符:764+
+类别信息:关闭错误:(:([Set AzureRmDiagnosticsSetting],PSInvalidOperationException+FullyQualifiedErrorId:Microsoft.Azure.Commands.Intights.Diagnostics.SetAzureRmDiagnosticsSettingCommand

这似乎是GitHub上报告的一个已知错误:https://github.com/Azure/azure-powershell/issues/6833

绕过它的唯一方法是恢复到AzureRm.Insights 5.0.0

相关内容

最新更新