Skip to content

Commit bd9730c

Browse files
Merge pull request #196709 from osalzberg/insights
Insights
2 parents 457c1cb + 53bffe3 commit bd9730c

File tree

5 files changed

+47
-105
lines changed

5 files changed

+47
-105
lines changed

articles/azure-monitor/essentials/activity-log.md

Lines changed: 44 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: bwren
1212
The Activity log is a [platform log](./platform-logs-overview.md) in Azure that provides insight into subscription-level events. Activity log includes such information as when a resource is modified or when a virtual machine is started. You can view the Activity log in the Azure portal or retrieve entries with PowerShell and CLI. This article provides details on viewing the Activity log and sending it to different destinations.
1313

1414
For more functionality, you should create a diagnostic setting to send the Activity log to one or more of these locations for the following reasons:
15-
- to [Azure Monitor Logs](../logs/data-platform-logs.md) for more complex querying and alerting, and longer retention (up to 2 years)
15+
- to [Azure Monitor Logs](../logs/data-platform-logs.md) for more complex querying and alerting, and longer retention (up to two years)
1616
- to Azure Event Hubs to forward outside of Azure
1717
- to Azure Storage for cheaper, long-term archiving
1818

@@ -23,7 +23,7 @@ See [Create diagnostic settings to send platform logs and metrics to different d
2323
2424
## Retention Period
2525

26-
Activity log events are retained in Azure for **90 days** and then deleted. There is no charge for entries during this time regardless of volume. For more functionality such as longer retention, you should create a diagnostic setting and route the entires to another location based on your needs. See the criteria in the earlier section of this article.
26+
Activity log events are retained in Azure for **90 days** and then deleted. There's no charge for entries during this time regardless of volume. For more functionality such as longer retention, you should create a diagnostic setting and route the entires to another location based on your needs. See the criteria in the earlier section of this article.
2727

2828
## View the Activity log
2929
You can access the Activity log from most menus in the Azure portal. The menu that you open it from determines its initial filter. If you open it from the **Monitor** menu, then the only filter will be on the subscription. If you open it from a resource's menu, then the filter is set to that resource. You can always change the filter though to view all other entries. Select **Add Filter** to add more properties to the filter.
@@ -43,7 +43,7 @@ For some events, you can view the Change history, which shows what changes happe
4343

4444
![Change history list for an event](media/activity-log/change-history-event.png)
4545

46-
If there are any associated changes with the event, you will see a list of changes that you can select. This opens up the **Change history (Preview)** page. On this page, you see the changes to the resource. In the following example, you can see not only that the VM changed sizes, but what the previous VM size was before the change and what it was changed to. To learn more about change history, see [Get resource changes](../../governance/resource-graph/how-to/get-resource-changes.md).
46+
If there are any associated changes with the event, you'll see a list of changes that you can select. This opens up the **Change history (Preview)** page. On this page, you see the changes to the resource. In the following example, you can see not only that the VM changed sizes, but what the previous VM size was before the change and what it was changed to. To learn more about change history, see [Get resource changes](../../governance/resource-graph/how-to/get-resource-changes.md).
4747

4848
![Change history page showing differences](media/activity-log/change-history-event-details.png)
4949

@@ -152,7 +152,7 @@ Following is sample output data from Event Hubs for an Activity log:
152152
```
153153

154154
## Send to Azure storage
155-
Send the Activity Log to an Azure Storage Account if you want to retain your log data longer than 90 days for audit, static analysis, or backup. If you only must retain your events for 90 days or less you do not need to set up archival to a Storage Account, since Activity Log events are retained in the Azure platform for 90 days.
155+
Send the Activity Log to an Azure Storage Account if you want to retain your log data longer than 90 days for audit, static analysis, or backup. If you only must retain your events for 90 days or less you don't need to set up archival to a Storage Account, since Activity Log events are retained in the Azure platform for 90 days.
156156

157157
When you send the Activity log to Azure, a storage container is created in the Storage Account as soon as an event occurs. The blobs in the container use the following naming convention:
158158

@@ -220,7 +220,7 @@ If a log profile already exists, you first must remove the existing log profile
220220
| Category |No |Comma-separated list of event categories that should be collected. Possible values are _Write_, _Delete_, and _Action_. |
221221
222222
### Example script
223-
Following is a sample PowerShell script to create a log profile that writes the Activity Log to both a Storage Account and Event Hub.
223+
Following is a sample PowerShell script to create a log profile that writes the Activity Log to both a Storage Account and an Event Hub.
224224
225225
```powershell
226226
# Settings needed for the new log profile
@@ -281,7 +281,7 @@ To disable the setting, perform the same procedure and select **Disconnect** to
281281
### Data structure changes
282282
The Export activity logs experience, sends the same data as the legacy method used to send the Activity log with some changes to the structure of the *AzureActivity* table.
283283

284-
The columns in the following table have been deprecated in the updated schema. They still exist in *AzureActivity* but they have no data. The replacements for these columns are not new, but they contain the same data as the deprecated column. They are in a different format, so you might need to modify log queries that use them.
284+
The columns in the following table have been deprecated in the updated schema. They still exist in *AzureActivity* but they have no data. The replacements for these columns aren't new, but they contain the same data as the deprecated column. They are in a different format, so you might need to modify log queries that use them.
285285

286286
|Activity Log JSON | Log Analytics column name<br/>*(older deprecated)* | New Log Analytics column name | Notes |
287287
|:---------|:---------|:---------|:---------|
@@ -300,118 +300,60 @@ The following columns have been added to *AzureActivity* in the updated schema:
300300
- Claims_d
301301
- Properties_d
302302

303-
## Activity Logs Insights
303+
## Activity log insights (Preview)
304+
304305
Activity log insights let you view information about changes to resources and resource groups in a subscription. The dashboards also present data about which users or services performed activities in the subscription and the activities' status. This article explains how to view Activity log insights in the Azure portal.
305306

306-
## Activity Log Analytics monitoring solution
307-
> [!Note]
308-
> The Azure Log Analytics monitoring solution will be deprecated soon and replaced by a workbook using the updated schema in the Log Analytics workspace. You can still use the solution if you already have it enabled, but it can only be used if you're collecting the Activity log using legacy settings.
307+
Before using Activity log insights, you'll have to [enable sending logs to your Log Analytics workspace](./diagnostic-settings.md).
309308

309+
### How does Activity log insights work?
310310

311+
Activity logs you send to a [Log Analytics workspace](/articles/azure-monitor/logs/log-analytics-workspace-overview.md) are stored in a table called AzureActivity.
311312

312-
### Use the solution
313-
Monitoring solutions are accessed from the **Monitor** menu in the Azure portal. Select **More** in the **Insights** section to open the **Overview** page with the solution tiles. The **Azure Activity Logs** tile displays a count of the number of **AzureActivity** records in your workspace.
313+
Activity log insights are a curated [Log Analytics workbook](/articles/azure-monitor/visualize/workbooks-overview.md) with dashboards that visualize the data in the AzureActivity table. For example, which administrators deleted, updated or created resources, and whether the activities failed or succeeded.
314314

315-
![Azure Activity Logs tile](media/activity-log/azure-activity-logs-tile.png)
315+
:::image type="content" source="media/activity-log/activity-logs-insights-main-screen.png" lightbox= "media/activity-log/activity-logs-insights-main-screen.png" alt-text="A screenshot showing Azure Activity logs insights dashboards.":::
316316

317+
### View Activity log insights - Resource group / Subscription level
317318

318-
Select the **Azure Activity Logs** tile to open the **Azure Activity Logs** view. The view includes the visualization parts in the table. Each part lists up to 10 items that matches that part's criteria for the specified time range. You can run a log query that returns all matching records by clicking **See all** at the bottom of the part.
319+
To view Activity log insights on a resource group or a subscription level:
319320

320-
![Azure Activity Logs dashboard](media/activity-log/activity-log-dash.png)
321+
1. In the Azure portal, select **Monitor** > **Workbooks**.
322+
1. Select **Activity Logs Insights** in the **Insights** section.
321323

324+
:::image type="content" source="media/activity-log/open-activity-log-insights-workbook.png" lightbox= "media/activity-log/open-activity-log-insights-workbook.png" alt-text="A screenshot showing how to locate and open the Activity logs insights workbook on a scale level.":::
322325

323-
### Enable the solution for new subscriptions
324-
> [!NOTE]
325-
>You will soon no longer be able to add the Activity Logs Analytics solution to your subscription with the Azure portal. You can add it using the following procedure with a Resource Manager template.
326-
327-
1. Copy the following json into a file called *ActivityLogTemplate*.json.
328-
329-
```json
330-
{
331-
"$schema": "https://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
332-
"contentVersion": "1.0.0.0",
333-
"parameters": {
334-
"workspaceName": {
335-
"type": "String",
336-
"defaultValue": "my-workspace",
337-
"metadata": {
338-
"description": "Specifies the name of the workspace."
339-
}
340-
},
341-
"location": {
342-
"type": "String",
343-
"allowedValues": [
344-
"east us",
345-
"west us",
346-
"australia central",
347-
"west europe"
348-
],
349-
"defaultValue": "australia central",
350-
"metadata": {
351-
"description": "Specifies the location in which to create the workspace."
352-
}
353-
}
354-
},
355-
"resources": [
356-
{
357-
"type": "Microsoft.OperationalInsights/workspaces",
358-
"name": "[parameters('workspaceName')]",
359-
"apiVersion": "2015-11-01-preview",
360-
"location": "[parameters('location')]",
361-
"properties": {
362-
"features": {
363-
"searchVersion": 2
364-
}
365-
}
366-
},
367-
{
368-
"type": "Microsoft.OperationsManagement/solutions",
369-
"apiVersion": "2015-11-01-preview",
370-
"name": "[concat('AzureActivity(', parameters('workspaceName'),')')]",
371-
"location": "[parameters('location')]",
372-
"dependsOn": [
373-
"[resourceId('microsoft.operationalinsights/workspaces', parameters('workspaceName'))]"
374-
],
375-
"plan": {
376-
"name": "[concat('AzureActivity(', parameters('workspaceName'),')')]",
377-
"promotionCode": "",
378-
"product": "OMSGallery/AzureActivity",
379-
"publisher": "Microsoft"
380-
},
381-
"properties": {
382-
"workspaceResourceId": "[resourceId('microsoft.operationalinsights/workspaces', parameters('workspaceName'))]",
383-
"containedResources": [
384-
"[concat(resourceId('microsoft.operationalinsights/workspaces', parameters('workspaceName')), '/views/AzureActivity(',parameters('workspaceName'))]"
385-
]
386-
}
387-
},
388-
{
389-
"type": "Microsoft.OperationalInsights/workspaces/datasources",
390-
"kind": "AzureActivityLog",
391-
"name": "[concat(parameters('workspaceName'), '/', subscription().subscriptionId)]",
392-
"apiVersion": "2015-11-01-preview",
393-
"location": "[parameters('location')]",
394-
"dependsOn": [
395-
"[parameters('WorkspaceName')]"
396-
],
397-
"properties": {
398-
"linkedResourceId": "[concat(subscription().Id, '/providers/microsoft.insights/eventTypes/management')]"
399-
}
400-
}
401-
]
402-
}
403-
```
326+
1. At the top of the **Activity Logs Insights** page, select:
327+
1. One or more subscriptions from the **Subscriptions** dropdown.
328+
1. Resources and resource groups from the **CurrentResource** dropdown.
329+
1. A time range for which to view data from the **TimeRange** dropdown.
330+
### View Activity log insights on any Azure resource
404331

405-
2. Deploy the template using the following PowerShell commands:
332+
>[!Note]
333+
> * Currently Applications Insights resources are not supported for this workbook.
406334
407-
```PowerShell
408-
Connect-AzAccount
409-
Select-AzSubscription <SubscriptionName>
410-
New-AzResourceGroupDeployment -Name activitysolution -ResourceGroupName <ResourceGroup> -TemplateFile <Path to template file>
411-
```
335+
To view Activity log insights on a resource level:
412336

337+
1. In the Azure portal, go to your resource, select **Workbooks**.
338+
1. Select **Activity Logs Insights** in the **Activity Logs Insights** section.
413339

340+
:::image type="content" source="media/activity-log/activity-log-resource-level.png" lightbox= "media/activity-log/activity-log-resource-level.png" alt-text="A screenshot showing how to locate and open the Activity logs insights workbook on a resource level.":::
414341

342+
1. At the top of the **Activity Logs Insights** page, select:
343+
344+
1. A time range for which to view data from the **TimeRange** dropdown.
345+
* **Azure Activity Log Entries** shows the count of Activity log records in each [activity log category](/articles/azure-monitor/essentials/activity-log-schema#categories).
346+
347+
:::image type="content" source="media/activity-log/activity-logs-insights-category-value.png" lightbox= "media/activity-log/activity-logs-insights-category-value.png" alt-text="Screenshot of Azure Activity Logs by Category Value":::
348+
349+
* **Activity Logs by Status** shows the count of Activity log records in each status.
350+
351+
:::image type="content" source="media/activity-log/activity-logs-insights-status.png" lightbox= "media/activity-log/activity-logs-insights-status.png" alt-text="Screenshot of Azure Activity Logs by Status":::
352+
353+
* At the subscription and resource group level, **Activity Logs by Resource** and **Activity Logs by Resource Provider** show the count of Activity log records for each resource and resource provider.
354+
355+
:::image type="content" source="media/activity-log/activity-logs-insights-resource.png" lightbox= "media/activity-log/activity-logs-insights-resource.png" alt-text="Screenshot of Azure Activity Logs by Resource":::
356+
415357
## Next steps
416358
* [Read an overview of platform logs](./platform-logs-overview.md)
417359
* [Review Activity log event schema](activity-log-schema.md)

articles/azure-monitor/essentials/activity-logs-insights.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Activity logs insights let you view information about changes to resources and r
1616
## Enable Activity log insights
1717
The only requirement to enable Activity log insights is to [configure the Activity log to export to a Log Analytics workspace](activity-log.md#send-to-log-analytics-workspace). Pre-built [workbooks](../visualize/workbooks-overview.md) curate this data, which is stored in the [AzureActivity](/azure/azure-monitor/reference/tables/azureactivity) table in the workspace.
1818

19-
:::image type="content" source="media/activity-log/activity-logs-insights-main.png" lightbox="media/activity-log/activity-logs-insights-main.png" alt-text="A screenshot showing Azure Activity logs insights dashboards":::
19+
:::image type="content" source="media/activity-log/activity-logs-insights-main-screen.png" lightbox="media/activity-log/activity-logs-insights-main-screen.png" alt-text="A screenshot showing Azure Activity logs insights dashboards.":::
2020

2121
## View Activity logs insights - Resource group / Subscription level
2222

295 KB
Loading

articles/role-based-access-control/change-history-report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ Here are the basic steps to get started:
201201

202202
1. [Create a Log Analytics workspace](../azure-monitor/logs/quick-create-workspace.md).
203203

204-
1. [Configure the Activity Log Analytics solution](../azure-monitor/essentials/activity-log.md#activity-log-analytics-monitoring-solution) for your workspace.
204+
1. [Configure the Activity](../azure-monitor/essentials/activity-log.md) for your workspace.
205205

206-
1. [View the activity logs](../azure-monitor/essentials/activity-log.md#activity-log-analytics-monitoring-solution). A quick way to navigate to the Activity Log Analytics solution Overview page is to click the **Logs** option.
206+
1. [View the activity logs Insights](../azure-monitor/essentials/activity-log.md). A quick way to navigate to the Activity Log Overview page is to click the **Logs** option.
207207

208208
![Azure Monitor logs option in portal](./media/change-history-report/azure-log-analytics-option.png)
209209

0 commit comments

Comments
 (0)