az monitor log-analytics query-pack query
命令组“az monitor log-analytics query-pack”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
管理 Log Analytics 查询包的查询。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az monitor log-analytics query-pack query create |
在 Log Analytics 查询包中创建特定查询。 |
Core | Preview |
| az monitor log-analytics query-pack query delete |
删除在 Log Analytics 查询包中定义的特定查询。 |
Core | Preview |
| az monitor log-analytics query-pack query list |
列出在 Log Analytics 查询包中定义的查询。 |
Core | Preview |
| az monitor log-analytics query-pack query search |
根据给定的搜索属性搜索 Log Analytics 查询包中定义的查询列表。 |
Core | Preview |
| az monitor log-analytics query-pack query show |
显示在 Log Analytics 查询包中定义的特定查询。 |
Core | Preview |
| az monitor log-analytics query-pack query update |
更新 Log Analytics 查询包中的特定查询。 |
Core | Preview |
az monitor log-analytics query-pack query create
命令组“az monitor log-analytics query-pack query”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
在 Log Analytics 查询包中创建特定查询。
az monitor log-analytics query-pack query create --body
--display-name
--name --query-id
--query-pack-name
--resource-group
[--categories]
[--description]
[--resource-types]
[--solutions]
[--tags]
示例
在查询包中创建查询
az monitor log-analytics query-pack query create --query-id 112c6b1f-5a86-4f01-a2d7-efb8e31f930f --display-name queryName -g resourceGroupName --query-pack-name queryPackName --body "heartbeat | take 10" --description "some description" --categories "[network,monitor]" --resource-types "[microsoft.network/loadbalancers,microsoft.insights/autoscalesettings]" --solutions "[networkmonitoring]" --tags "{version:[v2022-01-01,v2021-12-01]}"
必需参数
查询的内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
查询包中查询的唯一显示名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
Log Analytics 查询包中定义的特定查询的 ID 名称。 它必须是 GUID 类型。
Log Analytics 查询包的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
函数的相关类别。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Related Arguments |
查询的说明。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
函数的相关资源类型。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Related Arguments |
函数的相关 Log Analytics 解决方案。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Related Arguments |
与查询关联的标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az monitor log-analytics query-pack query delete
命令组“az monitor log-analytics query-pack query”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
删除在 Log Analytics 查询包中定义的特定查询。
az monitor log-analytics query-pack query delete [--ids]
[--name --query-id]
[--query-pack-name]
[--resource-group]
[--subscription]
[--yes]
示例
删除查询包中的查询
az monitor log-analytics query-pack query delete --query-id 112c6b1f-5a86-4f01-a2d7-efb8e31f930f -g resourceGroup --query-pack-name queryPackName
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Log Analytics 查询包中定义的特定查询的 ID 名称。 它必须是 GUID 类型。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Log Analytics 查询包的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az monitor log-analytics query-pack query list
命令组“az monitor log-analytics query-pack query”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
列出在 Log Analytics 查询包中定义的查询。
az monitor log-analytics query-pack query list --query-pack-name
--resource-group
[--include-body {0, 1, f, false, n, no, t, true, y, yes}]
示例
列出查询包中的查询
az monitor log-analytics query-pack query list -g resourceGroupName --query-pack-name queryPackName
在查询包中列出查询,而不列出查询正文内容
az monitor log-analytics query-pack query list -g resourceGroupName --query-pack-name queryPackName --include-body false
必需参数
Log Analytics 查询包的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
是否返回每个适用查询的正文。 如果为 false,则仅返回查询信息。 默认值:true。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az monitor log-analytics query-pack query search
命令组“az monitor log-analytics query-pack query”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
根据给定的搜索属性搜索 Log Analytics 查询包中定义的查询列表。
az monitor log-analytics query-pack query search [--categories]
[--ids]
[--include-body {0, 1, f, false, n, no, t, true, y, yes}]
[--query-pack-name]
[--resource-group]
[--resource-types]
[--solutions]
[--subscription]
[--tags]
示例
查询包中的搜索查询
az monitor log-analytics query-pack query search -g resourceGroupName --query-pack-name queryPackName --categories network --resource-types microsoft.insights/autoscalesettings --solutions networkmonitoring --tags version="[v2021-12-01]"
在查询包中搜索查询,而不包含查询正文内容
az monitor log-analytics query-pack query search -g resourceGroupName --query-pack-name queryPackName --categories network --resource-types microsoft.insights/autoscalesettings --solutions networkmonitoring --tags version="[v2021-12-01]" --include-body false
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
函数的相关类别。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | SearchProperties Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
是否返回每个适用查询的正文。 如果为 false,则仅返回查询信息。 默认值:true。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
Log Analytics 查询包的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
函数的相关资源类型。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | SearchProperties Arguments |
函数的相关 Log Analytics 解决方案。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | SearchProperties Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
与查询关联的标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | SearchProperties Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az monitor log-analytics query-pack query show
命令组“az monitor log-analytics query-pack query”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
显示在 Log Analytics 查询包中定义的特定查询。
az monitor log-analytics query-pack query show [--ids]
[--name --query-id]
[--query-pack-name]
[--resource-group]
[--subscription]
示例
在查询包中显示查询
az monitor log-analytics query-pack query show --query-id 112c6b1f-5a86-4f01-a2d7-efb8e31f930f -g resourceGroup --query-pack-name queryPackName
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Log Analytics 查询包中定义的特定查询的 ID 名称。 它必须是 GUID 类型。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Log Analytics 查询包的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az monitor log-analytics query-pack query update
命令组“az monitor log-analytics query-pack query”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
更新 Log Analytics 查询包中的特定查询。
az monitor log-analytics query-pack query update [--add]
[--body]
[--categories]
[--description]
[--display-name]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--name --query-id]
[--query-pack-name]
[--remove]
[--resource-group]
[--resource-types]
[--set]
[--solutions]
[--subscription]
[--tags]
示例
更新查询包中的查询
az monitor log-analytics query-pack query update --query-id 112c6b1f-5a86-4f01-a2d7-efb8e31f930f -g resourceGroup --query-pack-name queryPackName --body "heartbeat | take 20" --categories [2]=databases --tags version[0]=null
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
查询的内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
函数的相关类别。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Related Arguments |
查询的说明。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
查询包中查询的唯一显示名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Log Analytics 查询包中定义的特定查询的 ID 名称。 它必须是 GUID 类型。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Log Analytics 查询包的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
函数的相关资源类型。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Related Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
函数的相关 Log Analytics 解决方案。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Related Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
与查询关联的标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |