Skip to content

Commit 66aef99

Browse files
committed
added collection section for virtual network app
1 parent 4b69437 commit 66aef99

File tree

4 files changed

+174
-6
lines changed

4 files changed

+174
-6
lines changed
Lines changed: 170 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
id: azure-virtual-network
33
title: Azure Virtual Network
4+
sidebar_label: Azure Virtual Network
45
description: Learn about the Sumo Logic collection process for the Azure Virtual Network service.
56
---
67

@@ -10,35 +11,198 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
1011

1112
[Azure Virtual Network](https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview) is a service that provides the fundamental building block for your private network in Azure enabling many types of Azure resources to securely communicate with each other, using the internet, and on-premises networks. This integration helps in monitoring the round trip time, failed pings, inbound dropped packets, and inbound bytes.
1213

13-
## Metric types
14+
## Logs and Metric types
1415

15-
For Azure Virtual Network, you can collect the following metrics:
16+
For Azure Virtual Network, you can collect the following logs and metrics:
17+
18+
* **Virtual network flow logs**. It provides ingress and egress IP traffic flow with the following information:
19+
20+
* Inbound and Outbound flows per Rule
21+
* NIC and traffic flow
22+
* 5-tuple information with respect to flow (Source/Destination IP and Port, Protocol)
23+
* Allowed/Denied traffic flow.
24+
* Encryption status of your traffic
25+
26+
For more information, refer to the [virtual flow logs documentations](https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-overview).
1627

1728
* **Platform Metrics for Azure Virtual Network**. These metrics are available in [Microsoft.Network/virtualNetworks](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-network-virtualnetworks-metrics) namespace.
1829

30+
31+
### Sample log messages
32+
33+
```json
34+
{
35+
"acl_id": "/subscriptions/c088dd12-d692-42ad-a4b6-9a542d12ad2a/resourceGroups/hpalvnapp/providers/Microsoft.Network/networkSecurityGroups/MyLowCostVM-nsg",
36+
"bytes_sent_dest_to_src": "2572",
37+
"bytes_sent_src_to_dest": "2352",
38+
"category": "FlowLogFlowEvent",
39+
"dest_IP": "10.2.0.4",
40+
"dest_port": "22",
41+
"event_name": "FlowLogFlowEvent",
42+
"flowLogGUID": "b003d9f1-852e-419f-bed2-ec2d166d05e2",
43+
"flow_direction": "I",
44+
"flow_encryption_status": "NX",
45+
"flow_log_resource_id": "/SUBSCRIPTIONS/C088DD12-D692-42AD-A4B6-9A542D12AD2A/RESOURCEGROUPS/NETWORKWATCHERRG/PROVIDERS/MICROSOFT.NETWORK/NETWORKWATCHERS/NETWORKWATCHER_EASTUS/FLOWLOGS/MYLOWCOSTVM837_Z1-HPALVNAPP-FLOWLOG",
46+
"flow_state": "E",
47+
"mac": "000D3A130BFE",
48+
"num_packets_sent_dest_to_src": "11",
49+
"num_packets_sent_src_to_dest": "11",
50+
"protocol": "6",
51+
"rule_name": "UserRule_AllowMyIpAddressCustom8080Inbound",
52+
"src_ip": "91.118.39.74",
53+
"src_port": "55304",
54+
"target_resource_id": "/subscriptions/c088dd12-d692-42ad-a4b6-9a542d12ad2a/resourceGroups/hpalvnapp/providers/Microsoft.Network/networkInterfaces/mylowcostvm837_z1",
55+
"time": "1737500459279",
56+
"version": 4
57+
}
58+
```
59+
60+
### Sample queries
61+
62+
```sql title="Flow Traffic by Rule Name"
63+
_sourceCategory=Azure/VirtualNetworkFlow/Logs
64+
| json field=_raw "rule_name"
65+
| json field=_raw "target_resource_id"
66+
| json field=_raw "event_name"
67+
| json field=_raw "mac"
68+
| json field=_raw "src_ip"
69+
| json field=_raw "dest_IP"
70+
| json field=_raw "dest_port"
71+
| json field=_raw "protocol"
72+
| if(protocol="T","TCP", protocol) as protocol
73+
| if(protocol="U","UDP", protocol) as protocol
74+
| parse regex field=target_resource_id"(?<NSG>[\w-_.]+)$"
75+
| json field=_raw "src_port"
76+
| json field=_raw "flow_direction"
77+
| json field=_raw "flow_state" as traffic_a_d
78+
| timeslice 1h
79+
|where if ("*" = "*", true, protocol matches "*") AND if ("*" = "*", true, src_ip matches "*") AND if ("*" = "*", true, mac matches "*") AND if ("*" = "*", true, dest_port matches "*") AND if ("*" = "*", true, traffic_a_d matches "*") AND if ("*" = "*", true, dest_ip matches "*") AND if ("*" = "*", true, rule_name matches "*") AND if ("*" = "*", true, flow_direction matches "*") AND if ("*" = "*", true, event_name matches "*") AND if ("*" = "*", true, nsg matches "*")
80+
|count by rule_name,_timeslice
81+
| transpose row _timeslice column rule_name
82+
```
83+
84+
1985
## Setup
2086

2187
Azure service sends monitoring data to Azure Monitor, which can then [stream data to Eventhub](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/stream-monitoring-data-event-hubs). Sumo Logic supports:
2288

89+
* Virtual Network Flow Logs collection from Storage Account using our [Collect Logs from Azure Blob Storage](/docs/send-data/collect-from-other-data-sources/azure-blob-storage/block-blob/collect-logs) integration.
90+
* Activity Logs collection from [Azure Monitor](https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-get-started) using our [Azure Event Hubs source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/ms-azure-event-hubs-source/). It is recommended to create a separate source for activity logs. If you are already collecting these logs, you can skip this step.
2391
* Metrics collection using our [HTTP Logs and Metrics source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/) via Azure Functions deployed using the ARM template.
2492

25-
You must explicitly enable diagnostic settings for each Virtual Network you want to monitor. You can forward metrics to the same event hub provided they satisfy the limitations and permissions as described [here](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings?tabs=portal#destination-limitations).
2693

27-
When you configure the event hubs source or HTTP source, plan your source category to ease the querying process. A hierarchical approach allows you to make use of wildcards. For example: `Azure/VirtualNetwork/Metrics`.
94+
You must explicitly enable diagnostic settings and network flow logs for each Virtual Network you want to monitor. You can forward metrics to the same event hub provided they satisfy the limitations and permissions as described [here](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings?tabs=portal#destination-limitations).
95+
96+
When you configure the event hubs source or HTTP source, plan your source category to ease the querying process. A hierarchical approach allows you to make use of wildcards. For example: `Azure/VirtualNetwork/Metrics` and `Azure/VirtualNetwork/Logs`.
2897

2998
### Configure metrics collection
3099

31100
In this section, you will configure a pipeline for shipping metrics from Azure Monitor to an Event Hub, on to an Azure Function, and finally to an HTTP Source on a hosted collector in Sumo Logic.
32101

33-
1. [Configure an HTTP Source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-1-configure-an-http-source).
102+
1. Create hosted collector and tag tenant_name field
103+
<img src={useBaseUrl('img/integrations/microsoft-azure/Azure-Storage-Tag-Tenant-Name.png')} alt="Azure Storage Tag Tenant Name" style={{border: '1px solid gray'}} width="800" />
104+
2. [Configure an HTTP Source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-1-configure-an-http-source).
34105
2. [Configure and deploy the ARM Template](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-2-configure-azure-resources-using-arm-template).
35-
3. [Export metrics to Event Hub](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-3-export-metrics-for-a-particular-resource-to-event-hub). Perform below steps for each Virtual Network that you want to monitor.
106+
3. [Export metrics to Event Hub](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-3-export-metrics-for-a-particular-resource-to-event-hub). Perform below steps for each storage service (blob,queue,table and file) and each storage account that you want to monitor.
36107
* Choose `Stream to an event hub` as destination.
37108
* Select `AllMetrics`.
38109
* Use the Event hub namespace created by the ARM template in Step 2 above. You can create a new Event hub or use the one created by ARM template. You can use the default policy `RootManageSharedAccessKey` as the policy name.
110+
4. Tag the location field in the source with right location value.
111+
<img src={useBaseUrl('img/integrations/microsoft-azure/Azure-Storage-Tag-Location.png')} alt="Azure Storage Tag Location" style={{border: '1px solid gray'}} width="500" />
112+
113+
### Configure logs collection
114+
115+
#### Configuration requirements
116+
117+
Before you begin configuring Virtual Network Flow Log collection, make sure the following environment prerequisites are met:
118+
119+
* Your Storage Account must be of type General-purpose v2 or Blob storage.
120+
* Your Network Security Group and Storage Account should be in same resource location.
121+
* You also need to have Microsoft Authorization/role Assignments/write permissions, so they should be a "User Access Administrator" or "Owner".
122+
123+
Resource group names should not contains underscores (`_`).
124+
125+
#### Step 1: Configure Azure Storage Account
126+
127+
In this step you configure a storage account to which you will export monitoring data for your Azure service.
128+
The storage account must be a General-purpose v2 (GPv2) storage account. If you have a storage account with a container that you want to use for this purpose, make a note of its resource group, storage account name and container name and proceed to [step 2](#step-2-configure-an-http-source).
129+
130+
To configure an Azure storage account, do the following:
131+
132+
1. Create a new storage account General-purpose v2 (GPv2) storage account. For instructions, see [Create a storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=portal) in Azure help.
133+
2. Create a container(Optional) all services in azure create containers automatically. This step is needed only when you are exporting custom logs in some container.
134+
* In the Azure portal, navigate to the storage account you just created (in the previous step).
135+
* Select **Blobs** under **Blob Service**.
136+
* Select **+ Container**,
137+
* Enter the Name
138+
* Select **Private** for the Public Access Level.
139+
* Click **OK**.
140+
141+
Make a note of the container name. You will need to supply it later. By default, the flow logs are in `insights-logs-flowlogflowevent` container.
142+
If you have a storage account that you want to use for this purpose, make a note of its resource group, storage account name, then proceed to [step 2](#step-2-configure-an-http-source).
143+
144+
#### Step 2: Configure an HTTP Source
145+
146+
This section demonstrates how to configure an HTTP source to receive logs from the Azure function.
147+
148+
To configure an HTTP source for Azure, do the following:
149+
1. Select a hosted collector where you want to configure the HTTP source. If desired, create a new hosted collector, as described on [Configure a Hosted Collector](/docs/send-data/hosted-collectors/configure-hosted-collector).
150+
2. Configure an HTTP source, as described on [HTTP Logs and Metrics Source](/docs/send-data/hosted-collectors/http-source/logs-metrics). Make a note of the URL for the source, you will need it in the next step.
151+
3. In **Advanced Options for Logs**, under **Timestamp Format**, click **Specify a format** and enter the following:
152+
* Specify Format as epoch
153+
* Specify Timestamp locator as `\"time\": (.*),`
154+
155+
#### Step 3: Configure Azure Resources using ARM template
156+
157+
To deploy the ARM template-based Blob Storage collection, refer to step 3 of [Collect Logs from Azure Blob Storage(block blobs)](/docs/send-data/collect-from-other-data-sources/azure-blob-storage/block-blob/collect-logs#step-3-configure-azure-resources-using-arm-template).
158+
If you want to collect only flow logs from the storage account then you can add the filter `/blobServices/default/containers/insights-logs-flowlogflowevent/`.
159+
160+
<img src={useBaseUrl('img/integrations/microsoft-azure/azure-virtual-network/networkflowlogs-template-deployment.png')} alt="Configure ARM Template for Azure Blob Storage(block blobs) collection" style={{border: '1px solid gray'}} width="800" />
161+
162+
#### Step 4: Enable Virtual Network flow logs via the Azure Portal
163+
164+
Follow the steps detailed in the [Microsoft Azure Virtual Network documentation](https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-portal#create-a-flow-log) to enable the flow logs to point to the storage account you configured in the [Configure Azure Storage Account](#step-1-configure-azure-storage-account) section. You can select any target resources (available options are: Virtual network, Subnet, and Network interface) based on your requirements.
165+
166+
<img src={useBaseUrl('img/integrations/microsoft-azure/azure-virtual-network/virtualnetworkflowlogs.png')} alt="Configure Virtual Network Flow Logs" style={{border: '1px solid gray'}} width="800" />
167+
168+
#### Activity Logs
169+
170+
To collect activity logs, follow the instructions [here](/docs/integrations/microsoft-azure/audit). Do not perform this step in case you are already collecting activity logs for a subscription.
171+
172+
:::note
173+
Since this source contains logs from multiple regions make sure that you do not tag this source with the location tag.
174+
:::
175+
176+
177+
## Installing the Azure Virtual Network app
178+
179+
Now that you have set up data collection, install the Azure Virtual Network Sumo Logic app to use the pre-configured [dashboards](#viewing-the-azure-virtual-network-app-dashboards) that provide visibility into your environment for real-time analysis of overall usage.
180+
181+
import AppInstallNoDataSourceV2 from '../../reuse/apps/app-install-index-apps-v2.md';
182+
183+
<AppInstallNoDataSourceV2/>
184+
185+
## Viewing the Azure Virtual Network app dashboards
186+
187+
import ViewDashboards from '../../reuse/apps/view-dashboards.md';
188+
189+
<ViewDashboards/>
190+
191+
## Upgrade/Downgrade the Azure Virtual Network app (optional)
192+
193+
import AppUpdate from '../../reuse/apps/app-update.md';
194+
195+
<AppUpdate/>
196+
197+
## Uninstalling the Azure Virtual Network app (optional)
198+
199+
import AppUninstall from '../../reuse/apps/app-uninstall.md';
200+
201+
<AppUninstall/>
39202

40203
## Troubleshooting
41204

42205
### HTTP Logs and Metrics Source used by Azure Functions
43206

44207
To troubleshoot metrics collection, follow the instructions in [Collect Metrics from Azure Monitor > Troubleshooting metrics collection](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#troubleshooting-metrics-collection).
208+

docs/integrations/microsoft-azure/network-watcher.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
1111

1212
The Sumo Logic app for Azure Network Watcher leverages Network Security Group (NSG) flow logs to provide real-time visibility and analysis of your Azure Network. This App provides preconfigured Dashboards that allow you to monitor inbound traffic, outliers in traffic flow, and denied traffic flows.
1313

14+
:::info
15+
On 30 September 2027, Network security group (NSG) flow logs in Azure Network Watcher will be retired. As part of this retirement, you'll no longer be able to create new NSG flow logs starting 30 June 2025. To avoid service disruptions, [migrate your existing NSG flow logs configuration to Virtual Network Flow Logs](https://learn.microsoft.com/en-gb/azure/network-watcher/nsg-flow-logs-migrate). You can then, configure [collection for Virtual Network Flow logs](/docs/integrations/microsoft-azure/azure-virtual-network.md#setup) and install the new Sumo Logic app for [Azure Virtual Network](/docs/integrations/microsoft-azure/azure-virtual-network.md).
16+
:::
17+
1418
## Log types
1519

1620
The Sumo Logic App for Azure Network Watcher uses Network Security Group (NSG) flow logs. NSG flow logs provide ingress and egress IP traffic flow with the following information:
478 KB
Loading
1.09 MB
Loading

0 commit comments

Comments
 (0)