Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure日志分析查询vm消耗了多少数据以及消耗了哪些数据_Azure_Azure Log Analytics_Azure Data Explorer - Fatal编程技术网

Azure日志分析查询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 |

我想有一个查询,将返回类似于单一虚拟机的东西。所以查询应该显示单个vm的结果,以及它使用了什么类型的日志类型/解决方案以及使用了多少。 我不知道这是否有可能做类似的事情,也许?小费

通过这个查询,我可以列出所有vm向法律报告的总使用量,但我想了解有关单个vm的更多详细信息

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 BilledSizeType\u IsBillableComputer来完成此操作

以下是供您参考的示例查询:

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