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
Copy file name to clipboardExpand all lines: articles/network-watcher/network-watcher-analyze-nsg-flow-logs-graylog.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ ms.author: mareat
24
24
25
25
You can have many network security groups in your network with flow logging enabled. Several network security groups with flow logging enabled can make it cumbersome to parse and gain insights from your logs. This article provides a solution to centrally manage these network security group flow logs using Graylog, an open source log management and analysis tool, and Logstash, an open source server-side data processing pipeline.
26
26
27
+
> [!Warning]
28
+
> The following steps work with flow logs version 1. For details, see [Introduction to flow logging for network security groups](network-watcher-nsg-flow-logging-overview.md). The following instructions will not work with version 2 of the log files, without modification.
29
+
27
30
## Scenario
28
31
29
32
Network security group flow logs are enabled using Network Watcher. Flow logs flow in to Azure blob storage. A Logstash plugin is used to connect and process flow logs from blob storage and send them to Graylog. Once the flow logs are stored in Graylog, they can be analyzed and visualized into customized dashboards.
Copy file name to clipboardExpand all lines: articles/network-watcher/network-watcher-nsg-flow-logging-cli.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,9 @@ Network Security Group flow logs are a feature of Network Watcher that allows yo
31
31
32
32
To perform the steps in this article, you need to [install the Azure command-line interface for Mac, Linux, and Windows (CLI)](/cli/azure/install-azure-cli).
33
33
34
+
> [!NOTE]
35
+
> Flow Logs Version 2 are only available in the West Central US Region. Configuration is available through the Azure Portal and REST API. Enabling Version 2 logs in an unsupported region will result in Version 1 logs outputted to your storage account.
36
+
34
37
## Register Insights provider
35
38
36
39
In order for flow logging to work successfully, the **Microsoft.Insights** provider must be registered. If you are not sure if the **Microsoft.Insights** provider is registered, run the following script.
Copy file name to clipboardExpand all lines: articles/network-watcher/network-watcher-nsg-flow-logging-overview.md
+181-3Lines changed: 181 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,8 @@ ms.author: jdial
20
20
21
21
# Introduction to flow logging for network security groups
22
22
23
-
Network security group (NSG) flow logs are a feature of Network Watcher that allows you to view information about ingress and egress IP traffic through an NSG. Flow logs are written in json format, and show outbound and inbound flows on a per rule basis, the network interface (NIC) the flow applies to, 5-tuple information about the flow (Source/destination IP, source/destination port, and protocol), and if the traffic was allowed or denied.
23
+
Network security group (NSG) flow logs are a feature of Network Watcher that allows you to view information about ingress and egress IP traffic through an NSG. Flow logs are written in JSON format, and show outbound and inbound flows on a per rule basis, the network interface (NIC) the flow applies to, 5-tuple information about the flow (Source/destination IP, source/destination port, and protocol), if the traffic was allowed or denied, and in Version 2, throughput information (Bytes and Packets).
The same retention policies seen for other logs apply to flow logs. You can set log retention policy from 1 day to 2147483647 days. If a retention policy is not set, the logs are maintained forever.
34
35
36
+
You can also analyze flow logs using [traffic analytics](traffic-analytics.md).
37
+
38
+
35
39
## Log file
36
40
37
41
Flow logs include the following properties:
@@ -55,15 +59,118 @@ Flow logs include the following properties:
55
59
* **Destination Port** - The destination Port
56
60
* **Protocol** - The protocol of the flow. Valid values are **T** for TCP and **U** for UDP
57
61
* **Traffic Flow** - The direction of the traffic flow. Valid values are **I** for inbound and **O** for outbound.
58
-
* **Traffic** - Whether traffic was allowed or denied. Valid values are **A** for allowed and **D** for denied.
62
+
* **Traffic Decision** - Whether traffic was allowed or denied. Valid values are **A** for allowed and **D** for denied.
63
+
* **Flow State - Version 2 Only** - Captures the state of the flow. Possible states are **B**: Begin, when a flow is created. Statistics aren't provided. **C**: Continuing for an ongoing flow. Statistics are provided at 5-minute intervals. **E**: End, when a flow is terminated. Statistics are provided.
64
+
* **Packets - Source to destination - Version 2 Only** The total number of TCP or UDP packets sent from source to destination since last update.
65
+
* **Bytes sent - Source to destination - Version 2 Only** The total number of TCP or UDP packet bytes sent from source to destination since last update. Packet bytes include the packet header and payload.
66
+
* **Packets - Destination to source - Version 2 Only** The total number of TCP or UDP packets sent from destination to source since last update.
67
+
* **Bytes sent - Destination to source - Version 2 Only** The total number of TCP and UDP packet bytes sent from destination to source since last update. Packet bytes include packet header and payload.
68
+
69
+
## NSG flow logs version 2
70
+
> [!NOTE]
71
+
> Flow Logs Version 2 are only available in the West Central US Region. Configuration is available through the Azure Portal and REST API. Enabling Version 2 logs in an unsupported region will result in Version 1 logs outputted to your storage account.
72
+
73
+
Version 2 of the logs introduces flow state. You can configure which version of flow logs you receive. To learn how to enable flow logs, see [Enabling NSG flow logging](network-watcher-nsg-flow-logging-portal.md).
74
+
75
+
Flow state *B* is recorded when a flow is initiated. Flow state *C* and flow state *E* are states that mark the continuation of a flow and flow termination, respectively. Both *C* and *E* states contain traffic bandwidth information.
76
+
77
+
For continuation *C* and end *E* flow states, byte and packet counts are aggregate counts from the time of the previous flow tuple record. Referencing the previous example conversation, the total number of packets transferred is 1021+52+8005+47 = 9125. The total number of bytes transferred is 588096+29952+4610880+27072 = 5256000.
78
+
79
+
**Example**: Flow tuples from a TCP conversation between 185.170.185.105:35370 and 10.2.0.4:23:
For continuation *C* and end *E* flow states, byte and packet counts are aggregate counts from the time of the previous flow tuple record. Referencing the previous example conversation, the total number of packets transferred is 1021+52+8005+47 = 9125. The total number of bytes transferred is 588096+29952+4610880+27072 = 5256000.
59
86
60
87
The text that follows is an example of a flow log. As you can see, there are multiple records that follow the property list described in the preceding section.
61
88
89
+
## Sample log records
90
+
91
+
The text that follows is an example of a flow log. As you can see, there are multiple records that follow the property list described in the preceding section.
92
+
93
+
62
94
> [!NOTE]
63
95
> Values in the **flowTuples* property are a comma-separated list.
0 commit comments