gpt4 book ai didi

azure kql 从 VMSS 获取 OSversion 和 OSName

转载 作者:行者123 更新时间:2023-12-03 02:12:00 24 4
gpt4 key购买 nike

resources
| where type == "microsoft.compute/virtualmachinescalesets"
| extend
extensions = properties.virtualMachineProfile.extensionProfile.extensions,
osName = properties.virtualMachineProfile.storageProfile.osDisk.osName,
osVersion = properties.virtualMachineProfile.storageProfile.osDisk.osVersion,
osType = properties.virtualMachineProfile.storageProfile.osDisk.osType

我可以获得“Linux”的 osType,但是我想要 OSName(例如 ubuntu、Redhut)osVersion(如版本 18、19)
我需要做什么才能得到它。

最佳答案

resources
| where type == "microsoft.compute/virtualmachinescalesets"
| extend publisher = properties.virtualMachineProfile.storageProfile.imageReference.publisher
,version = properties.virtualMachineProfile.storageProfile.imageReference.version
,sku = properties.virtualMachineProfile.storageProfile.imageReference.sku
,offer = properties.virtualMachineProfile.storageProfile.imageReference.offer

附注

这是一个您可能会觉得有用的“工具”:

resources
| where type == "microsoft.compute/virtualmachinescalesets"
| where * has "ubuntu"

关于azure kql 从 VMSS 获取 OSversion 和 OSName,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73056931/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com