Azure中的表MmsPoolProperty中没有列声明池类型,因此我需要从池名中提取子字符串来检查池是内部的还是公共的。
如果池名包含子字符串"imc“,则为私有,如果包含"pmc”或"ghmc“,则为public。
MmsPoolProperty
| where TIMESTAMP > ago(1d)
| where ImageName contains "mac" or ImageName contains "osx"
| summarize arg_max(TIMESTAMP, AllPropertiesBlob) by PoolName // We can get rid of this once the decoupling has been rolled out for long enough that we don't have old telemetry
| extend props = parse_json(AllPropertiesBlob)
| project PoolName, UnitName = coalesce(props["VmControllerName"], PoolName)
| extend PoolType = case(PoolName contains "imc","Internal",
PoolName contains "pmc","Public",
PoolName contains "ghmc","Public")发布于 2021-10-11 14:10:59
函数的case()函数需要一个默认值作为最后一个参数,在后面添加如下内容:
| extend PoolType = case(PoolName contains "imc","Internal",
PoolName contains "pmc","Public",
PoolName contains "ghmc","Public",
"Unknown")https://stackoverflow.com/questions/69526089
复制相似问题