查询Azure Sentinel成本的结果奇怪

vcudknz3  于 2023-03-03  发布在  其他
关注(0)|答案(1)|浏览(112)

我正在为一些Azure Sentinel即付即用产品部署成本分析工具,但我发现的查询似乎并不能反映现实。
我在Microsoft页面上找到一些查询
并以以下KQL查询结束:

let t1 = Usage
| where StartTime >= startofday(ago(2d)) and EndTime < endofday(ago(2d))
| where IsBillable == true
| summarize BillableDataGB = sum(Quantity) / 1000. by bin(StartTime, 2d), Solution
| extend Solution = iif(Solution == "SecurityInsights", "AzureSentinel", Solution)
| project sumsenti = (BillableDataGB * 5.59)
| summarize d1 = bin(sum(sumsenti), 0.01);
let t2 = Usage
| where StartTime >= startofday(ago(1d)) and EndTime < endofday(ago(1d))
| where IsBillable == true
| summarize BillableDataGB = sum(Quantity) / 1000. by bin(StartTime, 1d), Solution
| extend Solution = iif(Solution == "SecurityInsights", "AzureSentinel", Solution)
| project sumsenti = (BillableDataGB * 5.59)
| summarize d2 = bin(sum(sumsenti), 0.01);
union t1,t2
| summarize day1 = sum(d1), day2 = sum(d2)

这三条线

| summarize BillableDataGB = sum(Quantity) / 1000. by bin(StartTime, 2d), Solution
| extend Solution = iif(Solution == "SecurityInsights", "AzureSentinel", Solution)
| project sumsenti = (BillableDataGB * 5.59)

获取可计费数据量并将其乘以5.59我需要将其乘以5.59,因为Microsoft页面显示的是Azure的每GB值here
此查询的输出与我在Azure成本分析上看到的结果差别太大
我非常理解这个查询,但是由于某种原因,它的输出显示最近两天接近3000美元,而Azure成本分析工具显示Sentinel最近的天数只有200美元,这没有意义,我不确定查询是否正确,或者查询是否寻找一些成本分析没有的资源
有人知道我在成本分析和查询中得到如此不同的值的原因吗?

83qze16e

83qze16e1#

在查询“bin”函数的语句时,可能存在一个错误。下面是您可以遵循的正确查询:

let t1 = Usage 

| where StartTime >= startofday(ago(2d)) and EndTime < endofday(ago(2d)) 

| where IsBillable == true 

| summarize BillableDataGB = sum(Quantity) / 1000. by Solution, bin(StartTime, 2d) 

| extend Solution = iif(Solution == "SecurityInsights", "AzureSentinel", Solution) 

| project sumsenti = (BillableDataGB * 5.59) 

| summarize d1 = bin(sum(sumsenti), 0.01); 

 

let t2 = Usage 

| where StartTime >= startofday(ago(1d)) and EndTime < endofday(ago(1d)) 

| where IsBillable == true 

| summarize BillableDataGB = sum(Quantity) / 1000. by Solution, bin(StartTime, 1d) 

| extend Solution = iif(Solution == "SecurityInsights", "AzureSentinel", Solution) 

| project sumsenti = (BillableDataGB * 5.59) 

| summarize d2 = bin(sum(sumsenti), 0.01); 

 

union t1,t2 

| summarize day1 = sum(d1), day2 = sum(d2)

可能导致输出成本不匹配的其他原因。成本分析工具的值与Microsoft Sentinel定价中显示的值之间可能存在差异。在估计成本时使用最新定价至关重要,因为Azure Sentinel的定价可能会更改。
此处显示不同的值。https://azure.microsoft.com/en-us/pricing/details/microsoft-sentinel/

相关问题