Skip to content

Commit 3ce1037

Browse files
Merge pull request #295564 from normesta/normesta-reg-updates-14
Getting this in for Ozge
2 parents bc82397 + 0875cee commit 3ce1037

File tree

3 files changed

+114
-15
lines changed

3 files changed

+114
-15
lines changed

articles/storage/blobs/monitor-blob-storage-reference.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Monitoring data reference for Azure Blob Storage
33
description: This article contains important reference material you need when you monitor Azure Blob Storage.
4-
ms.date: 11/05/2024
4+
ms.date: 02/27/2025
55
ms.custom: horz-monitor
66
ms.topic: reference
77
author: normesta
@@ -23,6 +23,13 @@ The following table lists the metrics available for the Microsoft.Storage/storag
2323
[!INCLUDE [horz-monitor-ref-metrics-tableheader](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-tableheader.md)]
2424
[!INCLUDE [Microsoft.Storage/storageAccounts](~/reusable-content/ce-skilling/azure/includes/azure-monitor/reference/metrics/microsoft-storage-storageaccounts-metrics-include.md)]
2525

26+
### Category: Object replication
27+
28+
| **Metric** | **Name in REST API** | **Unit** | **Aggregation** | **Dimensions** | **Time Grains** | **DS Export** |
29+
|---|---|---|---|---|---|---|
30+
| **Pending Bytes for Replication (preview)**<br><br>The size in bytes of the blob object pending for replication. | PendingBytesForReplication | Bytes | Average<br>Minimum, Maximum | TimeBucket, AccountName, and PolicyId | PT2M | No |
31+
| **Pending Operations for Replication (preview)**<br><br>The count of pending operations for replication. | PendingOperationsForReplication | Count | Average<br>Minimum, Maximum | TimeBucket, AccountName, and PolicyId | PT2M | No |
32+
2633
### Supported metrics for Microsoft.Storage/storageAccounts/blobServices
2734
The following table lists the metrics available for the Microsoft.Storage/storageAccounts/blobServices resource type.
2835
[!INCLUDE [horz-monitor-ref-metrics-tableheader](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-tableheader.md)]

articles/storage/blobs/object-replication-configure.md

Lines changed: 79 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: normesta
77

88
ms.service: azure-blob-storage
99
ms.topic: how-to
10-
ms.date: 05/05/2022
10+
ms.date: 02/27/2025
1111
ms.author: normesta
1212
ms.custom: devx-track-azurecli, devx-track-azurepowershell
1313
---
@@ -215,6 +215,10 @@ az storage account or-policy show \
215215
--policy "@-"
216216
```
217217

218+
### [REST API](#tab/rest-api)
219+
220+
N/A
221+
218222
---
219223

220224
## Configure object replication using a JSON file
@@ -228,7 +232,7 @@ For information about how to author a JSON file that contains the policy definit
228232
229233
The examples in this section show how to configure the object replication policy on the destination account, and then get the JSON file for that policy that another user can use to configure the policy on the source account.
230234

231-
# [Azure portal](#tab/portal)
235+
### [Azure portal](#tab/portal)
232236

233237
To configure object replication on the destination account with a JSON file in the Azure portal, follow these steps:
234238

@@ -257,7 +261,7 @@ The downloaded JSON file includes the policy ID that Azure Storage created for t
257261

258262
Keep in mind that uploading a JSON file to create a replication policy for the destination account via the Azure portal doesn't automatically create the same policy in the source account. Another user must create the policy on the source account before Azure Storage begins replicating objects.
259263

260-
# [PowerShell](#tab/powershell)
264+
### [PowerShell](#tab/powershell)
261265

262266
To download a JSON file that contains the replication policy definition for the destination account from PowerShell, call the [Get-AzStorageObjectReplicationPolicy](/powershell/module/az.storage/get-azstorageobjectreplicationpolicy) command to return the policy. Then convert the policy to JSON and save it as a local file, as shown in the following example. Remember to replace values in angle brackets and the file path with your own values:
263267

@@ -284,7 +288,7 @@ Set-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
284288
-Rule $object.Rules
285289
```
286290

287-
# [Azure CLI](#tab/azure-cli)
291+
### [Azure CLI](#tab/azure-cli)
288292

289293
To write the replication policy definition for the destination account to a JSON file from Azure CLI, call the [az storage account or-policy show](/cli/azure/storage/account/or-policy#az-storage-account-or-policy-show) command and output to a file.
290294

@@ -305,13 +309,68 @@ az storage account or-policy create \
305309
--policy @policy.json
306310
```
307311

312+
### [REST API](#tab/rest-api)
313+
314+
N/A
315+
316+
---
317+
318+
## Configure replication metrics
319+
320+
### Enable replication metrics
321+
322+
You can enable replication metrics on both new and existing object replication policies. It might take a few minutes to start observing the metrics.
323+
324+
#### [Azure portal](#tab/portal)
325+
326+
You can enable metrics using **Object Replication** blade from the new _Metrics_ column or by editing the _Edit Rules_ section of a policy from "…" on the OR policy row.
327+
328+
#### [PowerShell](#tab/powershell)
329+
330+
Not yet supported.
331+
332+
#### [Azure CLI](#tab/azure-cli)
333+
334+
Not yet supported.
335+
336+
#### [REST API](#tab/rest-api)
337+
338+
Enabling metrics is supported on API version 2021-08-01 and above. You can add the new metrics field to the replication policy. Sample:
339+
340+
``` json
341+
{
342+
"sourceAccount": "<source-account-name>",
343+
"destinationAccount": "<destination-account-name>",
344+
"metrics":
345+
{
346+
"enabled": true
347+
},
348+
"rules":
349+
[
350+
{
351+
"ruleId": "<rule-id>",
352+
"sourceContainer": "<source-container-name>",
353+
"destinationContainer": "<destination-container-name>"
354+
}
355+
]
356+
}
357+
```
358+
308359
---
309360

361+
If you enable metrics on a policy that is configured to copy over existing data, you might observe an increasing amount at the beginning while the policy works on initial phase of listing. Once this is completed, the replication will start.
362+
363+
### View replication metrics
364+
365+
You can click the **View** link from Metrics column to view monitoring metrics
366+
367+
To further view metrics in Azure Monitor, click on chart of a metric. This will direct you to Azure Monitor Metrics view with more filtering capabilities.
368+
310369
## Check the replication status of a blob
311370

312371
You can check the replication status for a blob in the source account using the Azure portal, PowerShell, or Azure CLI. Object replication properties aren't populated until replication has either completed or failed.
313372

314-
# [Azure portal](#tab/portal)
373+
### [Azure portal](#tab/portal)
315374

316375
To check the replication status for a blob in the source account in the Azure portal, follow these steps:
317376

@@ -321,7 +380,7 @@ To check the replication status for a blob in the source account in the Azure po
321380

322381
:::image type="content" source="media/object-replication-configure/check-replication-status-source.png" alt-text="Screenshot showing replication status for a blob in the source account":::
323382

324-
# [PowerShell](#tab/powershell)
383+
### [PowerShell](#tab/powershell)
325384

326385
To check the replication status for a blob in the source account with PowerShell, get the value of the object replication **ReplicationStatus** property, as shown in the following example. Remember to replace values in angle brackets with your own values:
327386

@@ -334,7 +393,7 @@ $blobSrc = Get-AzStorageBlob -Container $srcContainerName1 `
334393
$blobSrc.BlobProperties.ObjectReplicationSourceProperties[0].Rules[0].ReplicationStatus
335394
```
336395

337-
# [Azure CLI](#tab/azure-cli)
396+
### [Azure CLI](#tab/azure-cli)
338397

339398
To check the replication status for a blob in the source account with Azure CLI, get the value of the object replication **status** property, as shown in the following example:
340399

@@ -348,19 +407,23 @@ az storage blob show \
348407
--auth-mode login
349408
```
350409

351-
---
352-
353410
If the replication status for a blob in the source account indicates failure, then investigate the following possible causes:
354411

355412
- Make sure that the object replication policy is configured on the destination account.
356413
- Verify that the destination container still exists.
357414
- If the source blob has been encrypted with a customer-provided key as part of a write operation, then object replication will fail. For more information about customer-provided keys, see [Provide an encryption key on a request to Blob storage](encryption-customer-provided-keys.md).
358415

416+
### [REST API](#tab/rest-api)
417+
418+
N/A
419+
420+
---
421+
359422
## Remove a replication policy
360423

361424
To remove a replication policy and its associated rules, use Azure portal, PowerShell, or CLI.
362425

363-
# [Azure portal](#tab/portal)
426+
### [Azure portal](#tab/portal)
364427

365428
To remove a replication policy in the Azure portal, follow these steps:
366429

@@ -369,7 +432,7 @@ To remove a replication policy in the Azure portal, follow these steps:
369432
1. Select the **More** button next to the policy name.
370433
1. Select **Delete Rules**.
371434

372-
# [PowerShell](#tab/powershell)
435+
### [PowerShell](#tab/powershell)
373436

374437
To remove a replication policy, delete the policy from both the source account and the destination account. Deleting the policy also deletes any rules associated with it.
375438

@@ -385,7 +448,7 @@ Remove-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
385448
-PolicyId $destPolicy.PolicyId
386449
```
387450

388-
# [Azure CLI](#tab/azure-cli)
451+
### [Azure CLI](#tab/azure-cli)
389452

390453
To remove a replication policy, delete the policy from both the source account and the destination account. Deleting the policy also deletes any rules associated with it.
391454

@@ -401,6 +464,10 @@ az storage account or-policy delete \
401464
--resource-group <resource-group>
402465
```
403466

467+
### [REST API](#tab/rest-api)
468+
469+
N/A
470+
404471
---
405472

406473
## Next steps

articles/storage/blobs/object-replication-overview.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ author: normesta
66

77
ms.service: azure-blob-storage
88
ms.topic: conceptual
9-
ms.date: 12/08/2023
10-
ms.author: nachakra
9+
ms.date: 02/27/2025
10+
ms.author: normesta
1111
ms.custom: engagement-fy23
1212
---
1313

@@ -191,6 +191,31 @@ By default, the **AllowCrossTenantReplication** property is set to false for a s
191191

192192
You can use Azure Policy to audit a set of storage accounts to ensure that the **AllowCrossTenantReplication** property is set to prevent cross-tenant object replication. You can also use Azure Policy to enforce governance for a set of storage accounts. For example, you can create a policy with the deny effect to prevent a user from creating a storage account where the **AllowCrossTenantReplication** property is set to *true*, or from modifying an existing storage account to change the property value to *true*.
193193

194+
## Replication metrics
195+
> [!IMPORTANT]
196+
> Object replication metrics is currently in PREVIEW and available in all regions.
197+
> To opt in to the preview, see [Set up preview features in Azure subscription](/azure/azure-resource-manager/management/preview-features.md) and specify AllowObjectReplicationMetrics as the feature name. The provider name for this preview feature is Microsoft.Storage.
198+
>
199+
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
200+
201+
Object replication supports two metrics to provide you with insights into the replication progress:
202+
203+
- **Operations pending for replication**: Total number of operations pending replication from source to destination storage account emitted per the time buckets
204+
- **Bytes pending for replication**: Sum of bytes pending replication from source to destination storage accounts emitted per the time buckets
205+
206+
Each of the metrics above can be viewed with the dimension of time buckets. This enables insights into how many bytes or operations are pending for replication per time buckets as follows:
207+
208+
- 0-5 mins
209+
- 5-10 mins
210+
- 10-15 mins
211+
- 15-30 mins
212+
- 30 mins-2 hrs
213+
- 2-8 hrs
214+
- 8-24 hrs
215+
- `>`24 hrs
216+
217+
You can enable replication metrics on the source account for monitoring pending bytes and pending operations. For more information, see [Configure replication metrics](object-replication-configure.md#configure-replication-metrics).
218+
194219
## Replication status
195220

196221
You can check the replication status for a blob in the source account. For more information, see [Check the replication status of a blob](object-replication-configure.md#check-the-replication-status-of-a-blob).

0 commit comments

Comments
 (0)