Subscription1 包含一个名为 Workspace1 的 Log Analytics 工作区。你需要显示 Event 表中的错误事件。应在 Workspace1 中运行哪个查询?
选择一个答案
点击一个选项来检查您的答案。
正确答案: search in (Event) "error".
为什么这是答案
正确答案是 search in (Event) "error"。这是 Kusto 查询语言 (KQL) 中用于在特定表中搜索指定字符串的有效语法。search 操作符会在指定表(这里是 Event)的所有列中查找包含 "error" 的记录。 选项 Event | where EventType is "error" 是错误的,因为 KQL 中没有 is 运算符用于字符串比较,且 EventType 字段可能不存在或不包含所需信息。正确的比较运算符是 == 或 contains。 选项 select from Event where EventType == "error" 语法类似于 SQL,但 KQL 不使用 select from 结构。 选项 Get-Event Event | where {$.EventType == "error"} 语法类似于 PowerShell,而不是 KQL。KQL 不使用 Get-Event 或 $. 这样的结构。
通过考试 — 无需无休止地寻找答案
将本次考试的所有验证问题和解释集中在一处,节省数小时的准备时间。1,000+ 认证 · 20+ 语言 · 免费开始。
更快通过考试 → 无需银行卡