Skip to content

Commit 018cb51

Browse files
Merge pull request #234300 from mbender-ms/avnm-monitor
virtual network manager - New Article Set - Monitoring
2 parents b883e58 + 674c551 commit 018cb51

File tree

8 files changed

+181
-0
lines changed

8 files changed

+181
-0
lines changed

articles/virtual-network-manager/TOC.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
href: concept-security-admins.md
4646
- name: Security admin rule enforcement
4747
href: concept-enforcement.md
48+
- name: Monitoring
49+
items:
50+
- name: Event Log Options for Azure Virtual Network Manager
51+
href: concept-event-logs.md
4852
- name: Deployments
4953
href: concept-deployments.md
5054
- name: Remove or update components
@@ -83,6 +87,10 @@
8387
href: how-to-configure-cross-tenant-portal.md
8488
- name: Configure cross-tenant connection - CLI
8589
href: how-to-configure-cross-tenant-cli.md
90+
- name: Monitoring
91+
items:
92+
- name: Configure Event Logs for Azure Virtual Network Manager
93+
href: how-to-configure-event-logs.md
8694
- name: View applied configurations
8795
href: how-to-view-applied-configurations.md
8896
- name: Define dynamic network group membership with Azure Policy
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Event log options for Azure Virtual Network Manager
3+
description: This article covers the event log options for Azure Virtual Network Manager.
4+
author: mbender-ms
5+
ms.author: mbender
6+
ms.topic: conceptual
7+
ms.service: virtual-network-manager
8+
ms.date: 04/13/2023
9+
---
10+
11+
# Event log options for Azure Virtual Network Manager
12+
13+
Azure Virtual Network Manager uses Azure Monitor for data collection and analysis like many other Azure services. Azure Virtual Network Manager provides event logs for each network manager. You can store and view event logs with Azure Monitor’s Log Analytics tool in the Azure portal, and through a storage account. You may also send these logs to an event hub or partner solution.
14+
15+
## Supported log categories
16+
17+
Azure Virtual Network Manager currently provides the following log categories:
18+
- Network group membership change
19+
- Track when a particular virtual network’s network group membership is modified. In other words, a log is emitted when a virtual network is added to or removed from a network group. This can be used to trace network group membership changes over time and to capture a snapshot of a particular virtual network’s network group membership.
20+
21+
## Network group membership change attributes
22+
23+
This category emits one log per network group membership change. So, when a virtual network is added to or removed from a network group, a log is emitted correlating to that single addition or removal for that particular virtual network. The following attributes correspond to the logs that would be sent to your storage account; Log Analytics logs have slightly different attributes.
24+
25+
| Attribute | Description |
26+
|-----------|-------------|
27+
| time | Datetime when the event was logged. |
28+
| resourceId | Resource ID of the network manager. |
29+
| location | Location of the virtual network resource. |
30+
| operationName | Operation that resulted in the VNet being added or removed. Always the Microsoft.Network/virtualNetworks/networkGroupMembership/write operation. |
31+
| category | Category of this log. Always NetworkGroupMembershipChange. |
32+
| resultType | Indicates successful or failed operation. |
33+
| correlationId | GUID that can help relate or debug logs. |
34+
| level | Always Info. |
35+
| properties | Collection of properties of the log. |
36+
37+
Within the `properties` attribute are several nested attributes:
38+
39+
| properties attributes | Description |
40+
|--------------------|-------------|
41+
| Message | Basic success or failure message. |
42+
| MembershipId | Default membership ID of the virtual network. |
43+
| GroupMemberships | Collection of what network groups the virtual network belongs to. There may be multiple `NetworkGroupId` and `Sources` listed within this property since a virtual network can belong to multiple network groups simultaneously. |
44+
| MemberResourceIds | Resource ID of the virtual network that was added to or removed from a network group. |
45+
46+
Within the `GroupMemberships` attribute are several nested attributes:
47+
48+
| GroupMemberships attributes | Description |
49+
|-----------------------------|-------------|
50+
| NetworkGroupId | ID of a network group the virtual network belongs to. |
51+
| Sources | Collection of how the virtual network is a member of the network group. |
52+
53+
Within the `Sources` attribute are several nested attributes:
54+
55+
| Sources attributes | Description |
56+
|-------------------|-------------|
57+
| Type | Denotes whether the virtual network was added manually (StaticMembership) or conditionally via Azure Policy (Policy). |
58+
| StaticMemberId | If the Type value is StaticMembership, this property appears. |
59+
| PolicyAssignmentId | If the Type value is Policy, this property appears. ID of the Azure Policy assignment that associates the Azure Policy definition to the network group. |
60+
| PolicyDefinitionId | If the Type value is Policy, this property appears. ID of the Azure Policy definition that contains the conditions for the network group’s membership. |
61+
62+
## Accessing logs
63+
64+
Depending on how you consume event logs, you need to set up a Log Analytics workspace or a storage account for storing your log events.
65+
- Learn to [create a Log Analytics workspace](../azure-monitor/logs/quick-create-workspace.md).
66+
- Learn to [create a storage account](../storage/common/storage-account-create.md).
67+
68+
When setting up a Log Analytics workspace or a storage account, you need to select a region. If you’re using a storage account, it needs to be in the same region of the virtual network manager you’re accessing logs from. If you’re using a Log Analytics workspace, it can be in any region.
69+
70+
The network manager accessing the events isn't required to be in the same subscription as the Log Analytics workspace or the storage account used for storage, but permissions may restrict your ability to access logs across different subscriptions.
71+
72+
> [!NOTE]
73+
> At least one virtual network must be added or removed from a network group in order to generate logs. A log will generate for this event a couple minutes after network group membership change occurs.
74+
75+
## Next steps
76+
- Learn to Configure Create an [Azure Virtual Network Manager](create-virtual-network-manager-portal.md) instance using the Azure portal.
77+
- Learn more about [network groups](concept-network-groups.md) in Azure Virtual Network Manager.
78+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Configure event logs for Azure Virtual Network Manager
3+
description: This article describes how to configure and view event logs for Azure Virtual Network Manager. This includes how to access event logs in a Log Analytics workspace and a storage account.
4+
author: mbender-ms
5+
ms.author: mbender
6+
ms.topic: how-to
7+
ms.service: virtual-network-manager
8+
ms.date: 04/13/2023
9+
---
10+
11+
# Configure event logs for Azure Virtual Network Manager
12+
13+
When configurations are changed in Azure Virtual Network Manager, this can affect virtual networks that are associated with network groups in your instance. With Azure Monitor, you can monitor Azure Virtual Network Manager for virtual network changes.
14+
15+
In this article, you learn how to monitor Azure Virtual Network Manager for virtual network changes with Log Analytics or a storage account.
16+
17+
## Prerequisites
18+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
19+
- A deployed instance of [Azure Virtual Network Manager](./create-virtual-network-manager-portal.md) in your subscription, with managed virtual networks.
20+
- You deployed either a [Log Analytics workspace](../azure-monitor/essentials/tutorial-resource-logs.md#create-a-log-analytics-workspace) or a [storage account](../storage/common/storage-account-create.md) to store event logs and observe data related to Azure Virtual Network Manager.
21+
22+
## Configure Diagnostic Settings
23+
24+
Depending on how you consume event logs, you need to set up a Log Analytics workspace or a storage account for storing your log events. These are as storage targets when configuring diagnostic settings for Azure Virtual Network Manager. Once you have configured your diagnostic settings, you can view the event logs in the Log Analytics workspace or storage account.
25+
26+
> [!NOTE]
27+
> At least one virtual network must be added or removed from a network group in order to generate logs. A log will generate for this event a couple minutes after network group membership change occurs.
28+
### Configure event logs with Log Analytics
29+
30+
Log analytics is one option for storing event logs. In this task, you configure your Azure Virtual Network Manager Instance to use a Log Analytics workspace. This task assumes you have already deployed a Log Analytics workspace. If you haven't, see [Create a Log Analytics workspace](../azure-monitor/essentials/tutorial-resource-logs.md#create-a-log-analytics-workspace).
31+
32+
1. Navigate to the network manager you want to obtain the logs of.
33+
1. Under the **Monitoring** in the left pane, select the **Diagnostic settings**.
34+
1. Select **+ Add diagnostic setting** and enter a diagnostic setting name.
35+
1. Under **Logs**, select **Network Group Membership Change**.
36+
1. Under **Destination details**, select **Send to Log Analytics** and choose your subscription and Log Analytics workspace from the dropdown menus.
37+
38+
:::image type="content" source="media/how-to-configure-event-logging/log-analytics-diagnostic-settings.png" alt-text="Screenshot of Diagnostic settings page for setting up Log Analytics workspace.":::
39+
40+
1. Select **Save** and close the window.
41+
42+
### Configure event logs with a storage account
43+
44+
A storage account is another option for storing event logs. In this task, you configure your Azure Virtual Network Manager Instance to use a storage account. This task assumes you have already deployed a storage account. If you haven't, see [Create a storage account](../storage/common/storage-account-create.md).
45+
46+
1. Navigate to the network manager you want to obtain the logs of.
47+
1. Under the **Monitoring** in the left pane, select the **Diagnostic settings**.
48+
1. Select **+ Add diagnostic setting** and enter a diagnostic setting name.
49+
1. Under **Destination details**, select **Send to storage account** and choose your subscription and storage account from the dropdown menus.
50+
1. Under **Logs**, select **Network Group Membership Change** and enter a retention period.
51+
52+
:::image type="content" source="media/how-to-configure-event-logging/storage-account-diagnostic-settings.png" alt-text="Screenshot of Diagnostic settings for storage account.":::
53+
54+
1. Select **Save** and close the window.
55+
56+
## View Azure Virtual Network Manager event logs
57+
58+
In this task, you access the event logs for your Azure Virtual Network Manager instance.
59+
60+
1. Under the **Monitoring** in the left pane, select the **Logs**.
61+
1. In the **Diagnostics** window, select **Run** or **Load to editor** under **Get recent Network Group Membership Changes**.
62+
63+
:::image type="content" source="media/how-to-configure-event-logging/run-query.png" alt-text="Screenshot of Run and Load to editor buttons in the diagnostics window.":::
64+
65+
1. If you choose **Run**, the **Results** tab displays the event logs, and you can expand each log to view the details.
66+
67+
:::image type="content" source="media/how-to-configure-event-logging/workspace-log-details.png" alt-text="Screenshot of the event log details from the defined query.":::
68+
69+
1. When completed reviewing the logs, close the window and select **ok** to discard changes.
70+
71+
> [!NOTE]
72+
> When you close the **Query editor** window, you will be be returned to the **Azure Home** page. If you need to return to the **Logs** page, browse to your virtual network manager instance, and select **Logs** under the **Monitoring** in the left pane.
73+
74+
1. If you choose **Load to editor**, the **Query editor** window displays the query. Choose **Run** to display the event logs and you can expand each log to view the details.
75+
76+
:::image type="content" source="media/how-to-configure-event-logging/workspace-log-details.png" alt-text="Screenshot of log details.":::
77+
1. Close the window and select **ok** to discard changes.
78+
79+
## Next steps
80+
81+
- Learn about [Security admin rules](concept-security-admins.md)
82+
- Learn how to [Use queries in Azure Monitor Log Analytics](../azure-monitor/logs/queries.md)
83+
- Learn how to block network traffic with a [SecurityAdmin configuration](how-to-block-network-traffic-portal.md).

articles/virtual-network-manager/index.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,15 @@ landingContent:
9494
links:
9595
- text: Hub-spoke network topology in Azure
9696
url: /azure/architecture/reference-architectures/hybrid-networking/hub-spoke
97+
98+
# Card
99+
- title: Monitoring
100+
linkLists:
101+
- linkListType: overview
102+
links:
103+
- text: Event Log Options for Azure Virtual Network Manager
104+
url: concept-event-logs.md
105+
- linkListType: how-to-guide
106+
links:
107+
- text: Configure Event Logs for Azure Virtual Network Manager
108+
url: how-to-configure-event-logs.md
42.6 KB
Loading
44.4 KB
Loading
60.6 KB
Loading
86.4 KB
Loading

0 commit comments

Comments
 (0)