You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**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
+
26
33
### Supported metrics for Microsoft.Storage/storageAccounts/blobServices
27
34
The following table lists the metrics available for the Microsoft.Storage/storageAccounts/blobServices resource type.
@@ -215,6 +215,10 @@ az storage account or-policy show \
215
215
--policy "@-"
216
216
```
217
217
218
+
### [REST API](#tab/rest-api)
219
+
220
+
N/A
221
+
218
222
---
219
223
220
224
## 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
228
232
229
233
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.
230
234
231
-
# [Azure portal](#tab/portal)
235
+
###[Azure portal](#tab/portal)
232
236
233
237
To configure object replication on the destination account with a JSON file in the Azure portal, follow these steps:
234
238
@@ -257,7 +261,7 @@ The downloaded JSON file includes the policy ID that Azure Storage created for t
257
261
258
262
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.
259
263
260
-
# [PowerShell](#tab/powershell)
264
+
###[PowerShell](#tab/powershell)
261
265
262
266
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:
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.
290
294
@@ -305,13 +309,68 @@ az storage account or-policy create \
305
309
--policy @policy.json
306
310
```
307
311
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:
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
+
310
369
## Check the replication status of a blob
311
370
312
371
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.
313
372
314
-
# [Azure portal](#tab/portal)
373
+
###[Azure portal](#tab/portal)
315
374
316
375
To check the replication status for a blob in the source account in the Azure portal, follow these steps:
317
376
@@ -321,7 +380,7 @@ To check the replication status for a blob in the source account in the Azure po
321
380
322
381
:::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":::
323
382
324
-
# [PowerShell](#tab/powershell)
383
+
###[PowerShell](#tab/powershell)
325
384
326
385
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:
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:
340
399
@@ -348,19 +407,23 @@ az storage blob show \
348
407
--auth-mode login
349
408
```
350
409
351
-
---
352
-
353
410
If the replication status for a blob in the source account indicates failure, then investigate the following possible causes:
354
411
355
412
- Make sure that the object replication policy is configured on the destination account.
356
413
- Verify that the destination container still exists.
357
414
- 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).
358
415
416
+
### [REST API](#tab/rest-api)
417
+
418
+
N/A
419
+
420
+
---
421
+
359
422
## Remove a replication policy
360
423
361
424
To remove a replication policy and its associated rules, use Azure portal, PowerShell, or CLI.
362
425
363
-
# [Azure portal](#tab/portal)
426
+
###[Azure portal](#tab/portal)
364
427
365
428
To remove a replication policy in the Azure portal, follow these steps:
366
429
@@ -369,7 +432,7 @@ To remove a replication policy in the Azure portal, follow these steps:
369
432
1. Select the **More** button next to the policy name.
370
433
1. Select **Delete Rules**.
371
434
372
-
# [PowerShell](#tab/powershell)
435
+
###[PowerShell](#tab/powershell)
373
436
374
437
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.
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.
391
454
@@ -401,6 +464,10 @@ az storage account or-policy delete \
Copy file name to clipboardExpand all lines: articles/storage/blobs/object-replication-overview.md
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ author: normesta
6
6
7
7
ms.service: azure-blob-storage
8
8
ms.topic: conceptual
9
-
ms.date: 12/08/2023
10
-
ms.author: nachakra
9
+
ms.date: 02/27/2025
10
+
ms.author: normesta
11
11
ms.custom: engagement-fy23
12
12
---
13
13
@@ -191,6 +191,31 @@ By default, the **AllowCrossTenantReplication** property is set to false for a s
191
191
192
192
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*.
193
193
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
+
194
219
## Replication status
195
220
196
221
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