需要kql查询来查找代理的状态

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

需要找出同时安装了 AMA 和 MMA 的服务器。

心跳 |由计算机总结lastHeartbeat = max(TimeGenerate) |项目计算机,lastHeartbeat,AgentType = lastHeartbeat.Properties [“agentType”] |其中 tostring(AgentType) in ("AMA", "MMA") |通过计算机总结 AgentTypes = make_set(AgentType) |其中 array_length(AgentTypes) == 2

路径表达式 Properties_agentType 源必须是“dynamic”类型的标量。相反,收到了 datetime 类型的源

azure kql agent
1个回答
0
投票

上述错误的原因是您试图从

Properties["agentType"]
类型列而不是从
动态类型
列获取 datetime

enter image description here

Heartbeat

 表中的 
Timegenerated 列是日期时间类型,因此 lastHeartbeat
 的类型也与下面的示例相同。

enter image description here

因此,为了避免错误,请确保您仅访问数组类型的属性。

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