Skip to content

Commit dea3548

Browse files
authored
Merge pull request #105757 from bwren/am-manage-cost-storage
Azure Monitor up to manage cost storage
2 parents 80cf366 + 50f6d71 commit dea3548

File tree

1 file changed

+57
-48
lines changed

1 file changed

+57
-48
lines changed

articles/azure-monitor/platform/manage-cost-storage.md

Lines changed: 57 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: bwren
77
manager: carmonm
88
editor: ''
99
ms.assetid:
10-
10+
ms.service: azure-monitor
1111
ms.workload: na
1212
ms.tgt_pltfrm: na
1313
ms.topic: conceptual
@@ -205,126 +205,121 @@ Once alert is defined and the limit is reached, an alert is triggered and perfor
205205

206206
Higher usage is caused by one, or both of:
207207
- More nodes than expected sending data to Log Analytics workspace
208-
- More data than expected being sent to Log Analytics workspace
208+
- More data than expected being sent to Log Analytics workspace (perhaps due to starting to use a new solution or a configuration change to an existing solution)
209209

210210
## Understanding nodes sending data
211211

212-
To understand the number of computers reporting heartbeats each day in the last month, use
212+
To understand the number of nodes reporting heartbeats from the agent each day in the last month, use
213213

214214
```kusto
215-
Heartbeat | where TimeGenerated > startofday(ago(31d))
216-
| summarize dcount(Computer) by bin(TimeGenerated, 1d)
215+
Heartbeat
216+
| where TimeGenerated > startofday(ago(31d))
217+
| summarize nodes = dcount(Computer) by bin(TimeGenerated, 1d)
217218
| render timechart
218219
```
219-
220-
To get a list of computers which will be billed as nodes if the workspace is in the legacy Per Node pricing tier, look for nodes which are sending **billed data types** (some data types are free).
221-
To do this, use the `_IsBillable` [property](log-standard-properties.md#_isbillable) and use the leftmost field of the fully qualified domain name. This returns the list of computers with billed data:
220+
The get a count of nodes sending data seen can be determined using:
222221

223222
```kusto
224223
union withsource = tt *
225-
| where _IsBillable == true
226224
| extend computerName = tolower(tostring(split(Computer, '.')[0]))
227225
| where computerName != ""
228-
| summarize TotalVolumeBytes=sum(_BilledSize) by computerName
226+
| summarize nodes = dcount(computerName)
229227
```
230228

231-
The count of billable nodes seen can be estimated as:
229+
To get a list of nodes sending any data (and the amount of data sent by each) the follow query can be used:
232230

233231
```kusto
234232
union withsource = tt *
235-
| where _IsBillable == true
236233
| extend computerName = tolower(tostring(split(Computer, '.')[0]))
237234
| where computerName != ""
238-
| summarize billableNodes=dcount(computerName)
235+
| summarize TotalVolumeBytes=sum(_BilledSize) by computerName
239236
```
240237

241238
> [!NOTE]
242239
> Use these `union withsource = tt *` queries sparingly as scans across data types are expensive to execute. This query replaces the old way of querying per-computer information with the Usage data type.
243240
244-
A more accurate calculation of what will actually be billed is to get the count of computers per hour that are sending billed data types.
245-
(For workspaces in the legacy Per Node pricing tier, Log Analytics calculates the number of nodes which need to be billed on an hourly basis.)
241+
## Understanding ingested data volume
242+
243+
On the **Usage and Estimated Costs** page, the *Data ingestion per solution* chart shows the total volume of data sent and how much is being sent by each solution. This allows you to determine trends such as whether the overall data usage (or usage by a particular solution) is growing, remaining steady or decreasing.
244+
245+
### Data volume by solution
246+
247+
The query used to view the billable data volume by solution is
246248

247249
```kusto
248-
union withsource = tt *
249-
| where _IsBillable == true
250-
| extend computerName = tolower(tostring(split(Computer, '.')[0]))
251-
| where computerName != ""
252-
| summarize billableNodes=dcount(computerName) by bin(TimeGenerated, 1h) | sort by TimeGenerated asc
250+
Usage
251+
| where TimeGenerated > startofday(ago(31d))
252+
| where IsBillable == true
253+
| summarize BillableDataGB = sum(Quantity) / 1000. by bin(TimeGenerated, 1d), Solution | render barchart
253254
```
254255

255-
## Understanding ingested data volume
256+
Note that the clause `where IsBillable = true` filters out data types from certain solutions for which there is no ingestion charge.
256257

257-
On the **Usage and Estimated Costs** page, the *Data ingestion per solution* chart shows the total volume of data sent and how much is being sent by each solution. This allows you to determine trends such as whether the overall data usage (or usage by a particular solution) is growing, remaining steady or decreasing. The query used to generate this is
258+
### Data volume by type
259+
260+
You can drill in further to see data trends for by data type:
258261

259262
```kusto
260263
Usage | where TimeGenerated > startofday(ago(31d))| where IsBillable == true
261-
| summarize TotalVolumeGB = sum(Quantity) / 1000. by bin(TimeGenerated, 1d), Solution| render barchart
264+
| where TimeGenerated > startofday(ago(31d))
265+
| where IsBillable == true
266+
| summarize BillableDataGB = sum(Quantity) / 1000. by bin(TimeGenerated, 1d), DataType | render barchart
262267
```
263268

264-
Note that the clause "where IsBillable = true" filters out data types from certain solutions for which there is no ingestion charge.
265-
266-
You can drill in further to see data trends for specific data types, for example if you want to study the data due to IIS logs:
269+
Or to see a table by solution and type for the last month,
267270

268271
```kusto
269-
Usage | where TimeGenerated > startofday(ago(31d))| where IsBillable == true
270-
| where DataType == "W3CIISLog"
271-
| summarize TotalVolumeGB = sum(Quantity) / 1000. by bin(TimeGenerated, 1d), Solution| render barchart
272+
Usage
273+
| where TimeGenerated > startofday(ago(31d))
274+
| where IsBillable == true
275+
| summarize BillableDataGB = sum(Quantity) by Solution, DataType
276+
| sort by Solution asc, DataType asc
272277
```
273278

274279
### Data volume by computer
275280

276-
To see the **size** of billable events ingested per computer, use the `_BilledSize` [property](log-standard-properties.md#_billedsize), which provides the size in bytes:
281+
The `Usage` data type does not include information at the completer level. To see the **size** of ingested data per computer, use the `_BilledSize` [property](log-standard-properties.md#_billedsize), which provides the size in bytes:
277282

278283
```kusto
279284
union withsource = tt *
280285
| where _IsBillable == true
281286
| extend computerName = tolower(tostring(split(Computer, '.')[0]))
282-
| summarize Bytes=sum(_BilledSize) by computerName | sort by Bytes nulls last
287+
| summarize BillableDataBytes = sum(_BilledSize) by computerName | sort by Bytes nulls last
283288
```
284289

285290
The `_IsBillable` [property](log-standard-properties.md#_isbillable) specifies whether the ingested data will incur charges.
286291

287-
To see the count of **billable** events ingested per computer, use
292+
To see the **count** of billable events ingested per computer, use
288293

289294
```kusto
290295
union withsource = tt *
291296
| where _IsBillable == true
292297
| extend computerName = tolower(tostring(split(Computer, '.')[0]))
293-
| summarize eventCount=count() by computerName | sort by eventCount nulls last
294-
```
295-
296-
If you want to see counts for billable data types are sending data to a specific computer, use:
297-
298-
```kusto
299-
union withsource = tt *
300-
| where Computer == "computer name"
301-
| where _IsBillable == true
302-
| summarize count() by tt | sort by count_ nulls last
298+
| summarize eventCount = count() by computerName | sort by eventCount nulls last
303299
```
304300

305301
### Data volume by Azure resource, resource group, or subscription
306302

307-
For data from nodes hosted in Azure you can get the **size** of billable events ingested __per computer__, use the _ResourceId [property](log-standard-properties.md#_resourceid), which provides the full path to the resource:
303+
For data from nodes hosted in Azure you can get the **size** of ingested data __per computer__, use the _ResourceId [property](log-standard-properties.md#_resourceid), which provides the full path to the resource:
308304

309305
```kusto
310306
union withsource = tt *
311307
| where _IsBillable == true
312-
| summarize Bytes=sum(_BilledSize) by _ResourceId | sort by Bytes nulls last
308+
| summarize BillableDataBytes = sum(_BilledSize) by _ResourceId | sort by Bytes nulls last
313309
```
314310

315-
For data from nodes hosted in Azure you can get the **size** of billable events ingested __per Azure subscription__, parse the `_ResourceId` property as:
311+
For data from nodes hosted in Azure you can get the **size** of ingested data __per Azure subscription__, parse the `_ResourceId` property as:
316312

317313
```kusto
318314
union withsource = tt *
319315
| where _IsBillable == true
320316
| parse tolower(_ResourceId) with "/subscriptions/" subscriptionId "/resourcegroups/"
321317
resourceGroup "/providers/" provider "/" resourceType "/" resourceName
322-
| summarize Bytes=sum(_BilledSize) by subscriptionId | sort by Bytes nulls last
318+
| summarize BillableDataBytes = sum(_BilledSize) by subscriptionId | sort by Bytes nulls last
323319
```
324320

325321
Changing `subscriptionId` to `resourceGroup` will show the billable ingested data volume by Azure resource group.
326322

327-
328323
> [!NOTE]
329324
> Some of the fields of the Usage data type, while still in the schema, have been deprecated and will their values are no longer populated.
330325
> These are **Computer** as well as fields related to ingestion (**TotalBatches**, **BatchesWithinSla**, **BatchesOutsideSla**, **BatchesCapped** and **AverageProcessingTimeMs**.
@@ -362,6 +357,20 @@ Some suggestions for reducing the volume of logs collected include:
362357
| AzureDiagnostics | Change resource log collection to: <br> - Reduce the number of resources send logs to Log Analytics <br> - Collect only required logs |
363358
| Solution data from computers that don't need the solution | Use [solution targeting](../insights/solution-targeting.md) to collect data from only required groups of computers. |
364359

360+
### Getting nodes as billed in the Per Node pricing tier
361+
362+
To get a list of computers which will be billed as nodes if the workspace is in the legacy Per Node pricing tier, look for nodes which are sending **billed data types** (some data types are free).
363+
To do this, use the `_IsBillable` [property](log-standard-properties.md#_isbillable) and use the leftmost field of the fully qualified domain name. This returns the count of computers with billed
364+
data per hour (which is the granularity at which nodes are counted and billed):
365+
366+
```kusto
367+
union withsource = tt *
368+
| where _IsBillable == true
369+
| extend computerName = tolower(tostring(split(Computer, '.')[0]))
370+
| where computerName != ""
371+
| summarize billableNodes=dcount(computerName) by bin(TimeGenerated, 1h) | sort by TimeGenerated asc
372+
```
373+
365374
### Getting Security and Automation node counts
366375

367376
If you are on "Per node (OMS)" pricing tier, then you are charged based on the number of nodes and solutions you use, the number of Insights and Analytics nodes for which you are being billed will be shown in table on the **Usage and Estimated Cost** page.
@@ -503,4 +512,4 @@ There are some additional Log Analytics limits, some of which depend on the Log
503512
- To configure an effective event collection policy, review [Azure Security Center filtering policy](../../security-center/security-center-enable-data-collection.md).
504513
- Change [performance counter configuration](data-sources-performance-counters.md).
505514
- To modify your event collection settings, review [event log configuration](data-sources-windows-events.md).
506-
- To modify your syslog collection settings, review [syslog configuration](data-sources-syslog.md).
515+
- To modify your syslog collection settings, review [syslog configuration](data-sources-syslog.md).

0 commit comments

Comments
 (0)