首页 > 解决方案 > 使用 Kusto Query 在 Azure LAWS 中创建计算机组

问题描述

我正在尝试从日志分析保存的搜索中创建用于更新管理的计算机组,但无法完全弄清楚。

使用此查询时,它将列出名称中包含“test”的所有计算机。工作正常,但不完全是我想要的。

 Heartbeat
| where Computer contains "test"
| distinct Computer

但是,当我想按特定名称添加计算机时,出现错误。任何这如何通过使用计算机特定名称来获得结果?

[错误信息[1]

Heartbeat
| where Computer contains "test" and "test2" and "test3"
| distinct Computer

还尝试使用“or”“has”“==”但无法使其正常工作。

标签: azureazure-log-analyticsazure-data-explorer

解决方案


请尝试in 运算符

示例查询如下所示:

Heartbeat
| where Computer in ("test", "test2", "test3")
| distinct Computer

推荐阅读