我尝试通过在服务总线命名空间中启用诊断设置来收集诊断日志。但找不到消息详情
首先,像您已经做的那样在服务总线命名空间中启用
diagnostic settings
。完成后,在创建警报规则时选择 custom log search signal
后,使用下面的日志查询检索服务总线队列中超过 2 小时消耗的消息。
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SERVICEBUS" and Resource contains "newq"
| where Category == "Messages"
| where ActivityName_s == "Completed"
| where TimeGenerated > ago(2h)
| project Message, Resource
警报规则创建成功:
请参阅 MS Doc 中详细介绍的 Azure 服务总线的类别。