Azure日志分析查询vm消耗了多少数据以及消耗了哪些数据
我想有一个查询,将返回类似于单一虚拟机的东西。所以查询应该显示单个vm的结果,以及它使用了什么类型的日志类型/解决方案以及使用了多少。 我不知道这是否有可能做类似的事情,也许?小费 通过这个查询,我可以列出所有vm向法律报告的总使用量,但我想了解有关单个vm的更多详细信息Azure日志分析查询vm消耗了多少数据以及消耗了哪些数据,azure,azure-log-analytics,azure-data-explorer,Azure,Azure Log Analytics,Azure Data Explorer,我想有一个查询,将返回类似于单一虚拟机的东西。所以查询应该显示单个vm的结果,以及它使用了什么类型的日志类型/解决方案以及使用了多少。 我不知道这是否有可能做类似的事情,也许?小费 通过这个查询,我可以列出所有vm向法律报告的总使用量,但我想了解有关单个vm的更多详细信息 find where TimeGenerated > ago(30d) project _BilledSize, _IsBillable, Computer | where _IsBillable == true |
find where TimeGenerated > ago(30d) project _BilledSize, _IsBillable, Computer
| where _IsBillable == true
| extend computerName = tolower(tostring(split(Computer, '.')[0]))
| summarize BillableDataBytes = sum(_BilledSize) by computerName
| sort by BillableDataBytes nulls last
大多数情况下,您可以通过查询标准列或属性\u BilledSize、Type、\u IsBillable和Computer来完成此操作 以下是供您参考的示例查询:
union withsource=tt *
| where TimeGenerated between (ago(7d) .. now())
| where _IsBillable == true
| where isnotempty(Computer)
| where Computer == "MM-VM-RHEL-7"
| summarize BillableDataBytes = sum(_BilledSize) by Computer, _IsBillable, Type
| render piechart
下面是用于说明的屏幕截图:
union withsource=tt *
| where TimeGenerated between (ago(7d) .. now())
| where _IsBillable == true
| where isnotempty(Computer)
| where Computer == "MM-VM-RHEL-7"
| summarize BillableDataBytes = sum(_BilledSize) by Computer, _IsBillable, Type
| render piechart
相关参考资料:
union withsource=tt *
| where TimeGenerated between (ago(7d) .. now())
| where _IsBillable == true
| where isnotempty(Computer)
| where Computer == "MM-VM-RHEL-7"
| summarize BillableDataBytes = sum(_BilledSize) by Computer, _IsBillable, Type
| render piechart