Skip to content

Commit be287e4

Browse files
committed
Updates as per conversations with Francis
1 parent 859648b commit be287e4

File tree

6 files changed

+135
-24
lines changed

6 files changed

+135
-24
lines changed

.openpublishing.redirection.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40727,9 +40727,14 @@
4072740727
},
4072840728
{
4072940729
"source_path": "articles/storage/common/storage-enable-and-view-metrics.md",
40730-
"redirect_url": "/azure/storage/common/storage-metrics-in-azure-monitor",
40730+
"redirect_url": "/azure/storage/common/monitor-storage",
4073140731
"redirect_document_id": true
4073240732
},
40733+
{
40734+
"source_path": "articles/storage/common/storage-metrics-in-azure-monitor.md",
40735+
"redirect_url": "/azure/storage/common/monitor-storage",
40736+
"redirect_document_id": false
40737+
},
4073340738
{
4073440739
"source_path": "articles/azure-stack/partner/azure-stack-vaas-set-up-account.md",
4073540740
"redirect_url": "/azure/azure-stack/partner/azure-stack-vaas-set-up-resources",

articles/storage/blobs/storage-blob-scalable-app-verify-metrics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In part four of the series, you learn how to:
1919
> * Configure charts in the Azure portal
2020
> * Verify throughput and latency metrics
2121
22-
[Azure storage metrics](../common/storage-metrics-in-azure-monitor.md?toc=%2fazure%2fstorage%2fblobs%2ftoc.json) uses Azure monitor to provide a unified view into the performance and availability of your storage account.
22+
[Azure storage metrics](../common/monitor-storage.md?toc=%2fazure%2fstorage%2fblobs%2ftoc.json) uses Azure monitor to provide a unified view into the performance and availability of your storage account.
2323

2424
## Configure metrics
2525

@@ -47,7 +47,7 @@ Charts can have more than one metric assigned to them, but assigning more than o
4747

4848
## Dimensions
4949

50-
[Dimensions](../common/storage-metrics-in-azure-monitor.md?toc=%2fazure%2fstorage%2fblobs%2ftoc.json#metrics-dimensions) are used to look deeper into the charts and get more detailed information. Different metrics have different dimensions. One dimension that is available is the **API name** dimension. This dimension breaks out the chart into each separate API call. The first image below shows an example chart of total transactions for a storage account. The second image shows the same chart but with the API name dimension selected. As you can see, each transaction is listed giving more details into how many calls were made by API name.
50+
[Dimensions](../common/monitor-storage-reference.md?toc=%2fazure%2fstorage%2fblobs%2ftoc.json#metrics-dimensions) are used to look deeper into the charts and get more detailed information. Different metrics have different dimensions. One dimension that is available is the **API name** dimension. This dimension breaks out the chart into each separate API call. The first image below shows an example chart of total transactions for a storage account. The second image shows the same chart but with the API name dimension selected. As you can see, each transaction is listed giving more details into how many calls were made by API name.
5151

5252
![Storage account metrics - transactions without a dimension](./media/storage-blob-scalable-app-verify-metrics/transactionsnodimensions.png)
5353

articles/storage/common/monitor-storage-reference.md

Lines changed: 82 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Azure Storage provides the following transaction metrics in Azure Monitor.
7878
| SuccessE2ELatency | The average end-to-end latency of successful requests made to a storage service or the specified API operation. This value includes the required processing time within Azure Storage to read the request, send the response, and receive acknowledgment of the response. <br/><br/> Unit: Milliseconds <br/> Aggregation Type: Average <br/> Applicable dimensions: GeoType, ApiName, and Authentication ([Definition](#metrics-dimensions)) <br/> Value example: 1024 |
7979
| Availability | The percentage of availability for the storage service or the specified API operation. Availability is calculated by taking the total billable requests value and dividing it by the number of applicable requests, including those requests that produced unexpected errors. All unexpected errors result in reduced availability for the storage service or the specified API operation. <br/><br/> Unit: Percent <br/> Aggregation Type: Average <br/> Applicable dimensions: GeoType, ApiName, and Authentication ([Definition](#metrics-dimensions)) <br/> Value example: 99.99 |
8080

81+
<a id="metrics-dimensions" />
82+
8183
## Metrics dimensions
8284

8385
Azure Storage supports following dimensions for metrics in Azure Monitor.
@@ -102,7 +104,23 @@ The following table lists the properties for Azure Storage resource logs when th
102104

103105
### Fields that describe the operation
104106

105-
The following table contains properties that describe the operation.
107+
```json
108+
{
109+
"time": "2019-02-28T19:10:21.2123117Z",
110+
"resourceId": "/subscriptions/12345678-2222-3333-4444-555555555555/resourceGroups/mytestrp/providers/Microsoft.Storage/storageAccounts/testaccount1/blobServices/default",
111+
"category": "StorageWrite",
112+
"operationName": "PutBlob",
113+
"operationVersion": "2017-04-17",
114+
"schemaVersion": "1.0",
115+
"statusCode": 201,
116+
"statusText": "Success",
117+
"durationMs": 5,
118+
"callerIpAddress": "192.168.0.1:11111",
119+
"correlationId": "ad881411-201e-004e-1c99-cfd67d000000",
120+
"location": "uswestcentral",
121+
"uri": "http://mystorageaccount.blob.core.windows.net/cont1/blobname?timeout=10"
122+
}
123+
```
106124

107125
| Property | Description |
108126
|:--- |:---|
@@ -123,7 +141,34 @@ The following table contains properties that describe the operation.
123141

124142
### Fields that describe how the operation was authenticated
125143

126-
The following table contains properties that describe the operation.
144+
```json
145+
{
146+
"identity": {
147+
"authorization": [
148+
{
149+
"action": "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read",
150+
"principals": [
151+
{
152+
"id": "fde5ba15-4355-4223-b811-cccccccccccc",
153+
"type": "User"
154+
}
155+
],
156+
"roleAssignmentId": "ecf75cb8-491c-4a25-ad6e-aaaaaaaaaaaa",
157+
"roleDefinitionId": "b7e6dc6d-f1e8-4753-8033-ffffffffffff"
158+
}
159+
],
160+
"requester": {
161+
"appId": "691458b9-1327-4635-9f55-bbbbbbbbbbbb",
162+
"audience": "https://storage.azure.com/",
163+
"objectId": "fde5ba15-4355-4223-b811-cccccccccccc",
164+
"tenantId": "72f988bf-86f1-41af-91ab-dddddddddddd",
165+
"tokenIssuer": "https://sts.windows.net/72f988bf-86f1-41af-91ab-eeeeeeeeeeee/"
166+
},
167+
"type": "OAuth"
168+
},
169+
}
170+
171+
```
127172

128173
| Property | Description |
129174
|:--- |:---|
@@ -144,7 +189,41 @@ The following table contains properties that describe the operation.
144189

145190
### Fields that describe the service
146191

147-
The following table contains properties that describe the operation.
192+
```json
193+
{
194+
"properties": {
195+
"accountName": "testaccount1",
196+
"requestUrl": "https://testaccount1.blob.core.windows.net:443/upload?restype=container&comp=list&prefix=&delimiter=%2F&marker=&maxresults=30&include=metadata&_=1551405598426",
197+
"userAgentHeader": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134",
198+
"referrerHeader": "blob:https://ms.portal.azure.com/6f50025f-3b88-488d-b29e-3c592a31ddc9",
199+
"clientRequestId": "",
200+
"etag": "",
201+
"serverLatencyMs": 63,
202+
"serviceType": "blob",
203+
"operationCount": 0,
204+
"requestHeaderSize": 2658,
205+
"requestBodySize": 0,
206+
"responseHeaderSize": 295,
207+
"responseBodySize": 2018,
208+
"contentLengthHeader": 0,
209+
"requestMd5": "",
210+
"serverMd5": "",
211+
"lastModifiedTime": "",
212+
"conditionsUsed": "",
213+
"smbTreeConnectID" : "0x3",
214+
"smbPersistentHandleID" : "0x6003f",
215+
"smbVolatileHandleID" : "0xFFFFFFFF00000065",
216+
"smbMessageID" : "0x3b165",
217+
"smbCreditsConsumed" : "0x3",
218+
"smbCommandDetail" : "0x2000 bytes at offset 0xf2000",
219+
"smbFileId" : " 0x9223442405598953",
220+
"smbSessionID" : "0x8530280128000049",
221+
"smbCommandMajor" : "0x6",
222+
"smbCommandMinor" : "DirectoryCloseAndDelete"
223+
}
224+
225+
}
226+
```
148227

149228
| Property | Description |
150229
|:--- |:---|

articles/storage/common/monitor-storage.md

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Log entries are created only if there are requests made against the service endp
6666
- Timeout errors for both client and server
6767
- Failed GET requests with error code 304 (Not Modified)
6868

69-
All other failed anonymous requests are not logged. A full list of the logged data is documented in the [Storage Logged Operations and Status Messages](/rest/api/storageservices/storage-analytics-logged-operations-and-status-messages) and [Storage Log Format](/rest/api/storageservices/storage-analytics-log-format) topics.
69+
All other failed anonymous requests are not logged. A full list of the logged data is documented in the [Storage Logged Operations and Status Messages](/rest/api/storageservices/storage-analytics-logged-operations-and-status-messages) and [Storage Log Format](/rest/api/storageservices/storage-analytics-log-format) topics.
7070

7171
## Configuration
7272

@@ -120,21 +120,19 @@ You can list the metric definition of your storage account, or the individual st
120120

121121
In this example, replace the `<resource-ID>` placeholder with the resource ID of the entire storage account, or the resource ID of an individual storage service such as the as the blob, file, table or queue service. You can find these resource IDs in the **Properties** pages of your storage account on the Azure portal.
122122

123-
```powershell
124-
$resourceId = "<resource-ID>"
125-
Get-AzMetricDefinition -ResourceId $resourceId
126-
```
123+
```powershell
124+
$resourceId = "<resource-ID>"
125+
Get-AzMetricDefinition -ResourceId $resourceId
126+
```
127127

128128
#### Read metric values
129129

130130
You can read account-level metric values of your storage account, or the individual storage service such as the blob, file, table or queue service. Use the [Get-AzMetric](https://docs.microsoft.com/powershell/module/Az.Monitor/Get-AzMetric?view=azps-3.3.0) cmdlet.
131131

132-
In this example, replace the `<resource-ID>` placeholder with the resource ID of the entire storage account, or the resource ID of an individual storage service such as the as the blob, file, table or queue service. You can find these resource IDs in the **Properties** pages of your storage account on the Azure portal.
133-
134-
```powershell
135-
$resourceId = "<resource-ID>"
136-
Get-AzMetric -ResourceId $resourceId -MetricNames "UsedCapacity" -TimeGrain 01:00:00
137-
```
132+
```powershell
133+
$resourceId = "<resource-ID>"
134+
Get-AzMetric -ResourceId $resourceId -MetricNames "UsedCapacity" -TimeGrain 01:00:00
135+
```
138136

139137
### [Azure CLI](#tab/azure-cli)
140138

@@ -151,8 +149,6 @@ In this example, replace the `<resource-ID>` placeholder with the resource ID of
151149
#### Read account-level metric values
152150

153151
You can read the metric values of your storage account, or the individual storage service such as the blob, file, table or queue service. Use the [az monitor metrics list](https://docs.microsoft.com/cli/azure/monitor/metrics?view=azure-cli-latest#az-monitor-metrics-list) command.
154-
155-
In this example, replace the `<resource-ID>` placeholder with the resource ID of the entire storage account, or the resource ID of an individual storage service such as the as the blob, file, table or queue service. You can find these resource IDs in the **Properties** pages of your storage account on the Azure portal.
156152

157153
```azurecli-interactive
158154
az monitor metrics list --resource <resource-ID> --metric "UsedCapacity" --interval PT1H
@@ -302,10 +298,38 @@ The following example shows how to read metric data on the metric supporting mul
302298

303299
## Analyzing log data
304300

301+
You can access Resource logs either as a blob in a storage account, as event data, or through Log Analytic queries.
302+
303+
See [Azure Storage monitoring data reference](monitor-storage-reference.md) for a detailed reference of the fields that appear in these logs.
304+
305305
> [!NOTE]
306306
> Azure Storage logs in Azure Monitor is in public preview, and is available for preview testing in all public cloud regions. To enroll in the preview, see [this page](https://www.microsoft.com). This preview enables logs for blobs (including Azure Data Lake Storage Gen2), files, queues, tables, premium storage accounts in general-purpose v1 and general-purpose v2 storage accounts. Classic storage accounts are not supported.
307307
308-
Data in Azure Monitor Logs is stored in tables. Azure Storage stores data in the following tables.
308+
### Access logs in a storage account
309+
310+
Logs appear as blobs stored to a container in the target storage account. Data is collected and stored inside a single blob as a line delimited JSON payload. The name of the blob follows the following naming convention:
311+
312+
`https://<destination-storage-account>.blob.core.windows.net/insights-logs-<storage-operation>/resourceId=/subscriptions/<subscription-ID>/resourceGroups/<resource-group-name>/providers/Microsoft.Storage/storageAccounts/<source-storage-account>/blobServices/default/y=<year>/m=<month>/d=<day>/h=<hour>/m=<minute>/PT1H.json`
313+
314+
Here's an example:
315+
316+
`https://mylogstorageaccount.blob.core.windows.net/insights-logs-storagewrite/resourceId=/subscriptions/`<br>`208841be-a4v3-4234-9450-08b90c09f4/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount/blobServices/default/y=2019/m=07/d=30/h=23/m=12/PT1H.json`
317+
318+
### Access logs in Event hub
319+
320+
Logs sent to an event hub aren't stored as a file, but you can verify that the event hub received the log information. In the Azure portal, navigate to your event hub, and then verify that the **incoming messages** count is greater than zero.
321+
322+
![Audit logs](media/storage-logs-in-azure-monitor/event-hub-log.png)
323+
324+
You can access and read log data that is sent to your event hub by using security information and event management and monitoring tools. For more information, see [What can I do with the monitoring data being sent to my event hub?](https://docs.microsoft.com/azure/azure-monitor/platform/stream-monitoring-data-event-hubs#what-can-i-do-with-the-monitoring-data-being-sent-to-my-event-hub).
325+
326+
### Access logs in Log Analytics workspace
327+
328+
You can access logs sent to a Log Analytics workspace, by using Azure Monitor log queries.
329+
330+
See [Get started with Log Analytics in Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/log-query/get-started-portal).
331+
332+
Data is stored in the following tables.
309333

310334
| Table | Description |
311335
|:---|:---|
@@ -314,8 +338,6 @@ Data in Azure Monitor Logs is stored in tables. Azure Storage stores data in the
314338
|StorageQueueLogs | Logs that describe activity in queues.|
315339
|StorageTableLogs| Logs that describe activity in tables.|
316340

317-
See [Azure Storage monitoring data reference](monitor-storage-reference.md) for a detailed reference of the fields that appear in these logs.
318-
319341
### Azure Storage Log Analytics queries in Azure Monitor
320342

321343
Here are some queries that you can enter into the **Log search** search bar to help you monitor your Azure Storage accounts. These queries work with the [new language](https://docs.microsoft.com/azure/azure-monitor/log-query/log-query-overview).
@@ -368,6 +390,11 @@ Following are queries that you can use to help you monitor your Azure Storage ac
368390
| sort by count_ desc
369391
| render piechart
370392
```
393+
## FAQ
394+
395+
**Does Azure Storage support metrics for Managed Disks or Unmanaged Disks?**
396+
397+
No, Azure Compute supports the metrics on disks. See [article](https://azure.microsoft.com/blog/per-disk-metrics-managed-disks/) for more details.
371398
372399
## Next steps
373400

articles/storage/common/storage-analytics-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Storage Analytics can store metrics that include aggregated transaction statisti
1717

1818
> [!NOTE]
1919
> Storage Analytics metrics are available for the Blob, Queue, Table, and File services.
20-
> Storage Analytics metrics are now Classic metrics. Microsoft recommends using [Storage Metrics in Azure Monitor](storage-metrics-in-azure-monitor.md) instead of Storage Analytics metrics.
20+
> Storage Analytics metrics are now Classic metrics. Microsoft recommends using [Storage Metrics in Azure Monitor](monitor-storage.md) instead of Storage Analytics metrics.
2121
2222
## Transaction metrics
2323
A robust set of data is recorded at hourly or minute intervals for each storage service and requested API operation, including ingress/egress, availability, errors, and categorized request percentages. You can see a complete list of the transaction details in the [Storage Analytics Metrics Table Schema](/rest/api/storageservices/storage-analytics-metrics-table-schema) topic.

articles/storage/common/storage-sas-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ The following recommendations for using shared access signatures can help mitiga
111111
- **Understand that your account will be billed for any usage, including via a SAS.** If you provide write access to a blob, a user may choose to upload a 200 GB blob. If you've given them read access as well, they may choose to download it 10 times, incurring 2 TB in egress costs for you. Again, provide limited permissions to help mitigate the potential actions of malicious users. Use short-lived SAS to reduce this threat (but be mindful of clock skew on the end time).
112112
- **Validate data written using a SAS.** When a client application writes data to your storage account, keep in mind that there can be problems with that data. If your application requires that data be validated or authorized before it is ready to use, you should perform this validation after the data is written and before it is used by your application. This practice also protects against corrupt or malicious data being written to your account, either by a user who properly acquired the SAS, or by a user exploiting a leaked SAS.
113113
- **Know when not to use a SAS.** Sometimes the risks associated with a particular operation against your storage account outweigh the benefits of using a SAS. For such operations, create a middle-tier service that writes to your storage account after performing business rule validation, authentication, and auditing. Also, sometimes it's simpler to manage access in other ways. For example, if you want to make all blobs in a container publicly readable, you can make the container Public, rather than providing a SAS to every client for access.
114-
- **Use Azure Monitor and Azure Storage logs to monitor your application.** You can use Azure Monitor and storage analytics logging to observe any spike in authorization failures due to an outage in your SAS provider service or to the inadvertent removal of a stored access policy. For more information, see [Azure Storage metrics in Azure Monitor](storage-metrics-in-azure-monitor.md?toc=%2fazure%2fstorage%2fblobs%2ftoc.json) and [Azure Storage Analytics logging](storage-analytics-logging.md?toc=%2fazure%2fstorage%2fblobs%2ftoc.json).
114+
- **Use Azure Monitor and Azure Storage logs to monitor your application.** You can use Azure Monitor and storage analytics logging to observe any spike in authorization failures due to an outage in your SAS provider service or to the inadvertent removal of a stored access policy. For more information, see [Azure Storage metrics in Azure Monitor](monitor-storage.md?toc=%2fazure%2fstorage%2fblobs%2ftoc.json) and [Azure Storage Analytics logging](storage-analytics-logging.md?toc=%2fazure%2fstorage%2fblobs%2ftoc.json).
115115

116116
## Get started with SAS
117117

0 commit comments

Comments
 (0)