Skip to content

Commit 6f9c020

Browse files
committed
Last draft
1 parent 9165ada commit 6f9c020

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

articles/storage/blobs/lifecycle-management-policy-monitor.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Lifecycle management policy monitoring
33
titleSuffix: Azure Blob Storage
4-
description: Monitor Lifecycle management policy runs
4+
description: Learn how to monitor Azure Blob Storage lifecycle management policy execution by using events, metrics, and logs.
55
author: normesta
66

77
ms.author: normesta
@@ -13,11 +13,11 @@ ms.topic: conceptual
1313

1414
# Monitor lifecycle management policy runs
1515

16-
You can determine when a lifecycle management run completes by subscribing to an event. You can use event properties to identify issues and investigate errors by using metrics and logs.
16+
You can monitor Azure Blob Storage lifecycle management policy run by using events, metrics, and logs. To determine when a lifecycle management run completes by subscribing to an event. You can use event properties to identify issues and then diagnose those issues by using metrics and logs.
1717

1818
## Receiving notifications when a run is complete
1919

20-
A client can be notified when a lifecycle management run is complete by subscribing to the `LifecyclePolicyCompleted` event. This event is generated when the actions defined by a lifecycle management policy are performed. A summary section appears for each action that is included in the policy definition. The following json shows an example `LifecyclePolicyCompleted` event for a policy. Because the policy definition includes the `delete`, `tierToCool`, `tierToCold`, and `tierToArchive` actions, a summary section appears for each one.
20+
To be notified when a lifecycle management run is complete, subscribe to the `LifecyclePolicyCompleted` event. This event is generated when the actions defined by a lifecycle management policy are performed. A summary section appears for each action that is included in the policy definition. The following json shows an example `LifecyclePolicyCompleted` event for a policy. A summary section appears for the `delete`, `tierToCool`, `tierToCold`, and `tierToArchive` actions. The following JSON shows an example of an event notification.
2121

2222
```json
2323
{
@@ -54,21 +54,11 @@ A client can be notified when a lifecycle management run is complete by subscrib
5454
}
5555
```
5656

57-
The following table describes the schema of the `LifecyclePolicyCompleted` event.
58-
59-
|Field|Type|Description|
60-
|---|---|---|
61-
|scheduleTime|string|The time that the lifecycle policy was scheduled|
62-
|deleteSummary|vector\<byte\>|The results summary of blobs scheduled for delete operation|
63-
|tierToCoolSummary|vector\<byte\>|The results summary of blobs scheduled for tier-to-cool operation|
64-
|tierToColdSummary|vector\<byte\>|The results summary of blobs scheduled for tier-to-cold operation|
65-
|tierToArchiveSummary|vector\<byte\>|The results summary of blobs scheduled for tier-to-archive operation|
66-
6757
To learn more about the different ways to subscribe to an event, see [Event handlers in Azure Event Grid](../../event-grid/event-handlers.md?toc=/azure/storage/blobs/toc.json#microsoftstoragelifecyclepolicycompleted-event).
6858

6959
## Investigating errors by using metric and logs
7060

71-
The event response from the previous section shows that the lifecycle management policy attempted to delete five objects, but succeeded with only three of them. The `testFile4.txt` and `testFile5.txt` files were not successfully deleted as part of that run. To diagnose why some objects weren't processed successfully, you can use metrics explorer and query resource logs in Azure Monitor.
61+
The event response example from the previous section shows that the lifecycle management policy attempted to delete five objects, but succeeded with only three of them. The `testFile4.txt` and `testFile5.txt` files were not successfully deleted as part of that run. To diagnose why some objects weren't processed successfully, you can use metrics explorer and query resource logs in Azure Monitor.
7262

7363
### Metrics
7464

@@ -82,14 +72,14 @@ Use the following metric filters to narrow transactions to those executed by the
8272
| API name | equal | `DeleteBlob` |
8373
| Response type | not equal | `Success` |
8474

85-
The following image shows an example. The line chart shows the time these operations failed.
75+
The following image shows an example of the query and the query result. The line chart that appears in the query result shows the time when these operations failed.
8676

8777
> [!div class="mx-imgBorder"]
8878
> ![Screenshot showing metrics being applied to determine delete operations that failed.](media/lifecycle-management-policy-monitor/lifecycle-management-policy-metrics.png)
8979
9080
### Logs
9181

92-
To find out why objects weren't successfully processed by the policy, you can look at resource logs. Narrow logs to the time frame of the failures. Then, look at entries where the **UserAgentHeader** field is set to **ObjectLifeCycleScanner** or **OLCMScanner**. If you configured a diagnostic setting to send logs to Azure Monitor Log Analytics workspace, then you can use a Kusto query. The following example query finds log entries for failed delete operations that were initiated by a lifecycle management policy.
82+
To find out why objects weren't successfully processed by the policy, you can look at resource logs. Narrow logs to the time frame of the failures. Then, look at entries where the **UserAgentHeader** field is set to **ObjectLifeCycleScanner** or **OLCMScanner**. If you configured a diagnostic setting to send logs to Azure Monitor Log Analytics workspace, then you can use a Kusto query to locate those log entries. The following example query finds log entries for failed delete operations that were initiated by a lifecycle management policy.
9383

9484
```kusto
9585
StorageBlobLogs
-6.99 KB
Loading

0 commit comments

Comments
 (0)