Azure cloud install page: VNet flow logs update
For DevOps and the website owner
Page: getenigma.ai/resources > Cloud providers > Enigma AI Azure cloud install
Why: the page’s “Option 3: NSG Flow Logs” no longer works. Azure stopped allowing new NSG (network security group) flow logs on June 30, 2025 and retires them on September 30, 2027. The Enigma AI sensor reads their replacement, VNet (virtual network) flow logs, from sensor version v1.10.0 onward. Option 3 also pointed to an “Enigma Flow Collector” that does not exist; the normal sensor does this now.
Changes, in page order:
| # | Where | Change |
|---|---|---|
| 1 | Overview, the bulleted list of approaches | Replace the “NSG Flow Logs” bullet with block A |
| 2 | End of “Option 1: Virtual Network TAP (vTAP)”, before “vTAP Deployment Scenarios” | Insert block B |
| 3 | The whole “Option 3: NSG Flow Logs” section (3.1 to 3.4) | Replace with block C |
| 4 | Troubleshooting, the “NSG Flow Logs Issues” subsection | Replace with block D |
| 5 | “Comparing the Options” table, the “NSG Flow Logs” column | Replace with the column in block E |
Everything else on the page stays as it is. Formatting (headings, numbered steps, code blocks) should match the rest of the page.
Block A: Overview bullet
- VNet Flow Logs: connection-level monitoring from Azure’s own flow records, for VMs a Virtual Network TAP cannot cover, such as VMs behind a public load balancer
Block B: Note under Option 1
VMs behind a public load balancer: Virtual Network TAP is in preview, and Microsoft does not support it for VMs behind a Standard public load balancer: those VMs drop traffic when they are added to a TAP. Monitor those VMs with Option 3 (VNet Flow Logs) and keep vTAP for everything else. One Enigma AI sensor can do both. See “Using vTAP and VNet Flow Logs together” under Option 3.
Block C: Option 3 (replaces the existing Option 3)
Option 3: VNet Flow Logs
Azure Network Watcher records every connection to and from a VM’s network interface in VNet flow logs, written to a storage account about once a minute. The Enigma AI sensor reads those records, turns them into connection records, and sends them to Enigma AI the same way as captured traffic.
Use this option for VMs that Virtual Network TAP cannot cover, such as VMs behind a public load balancer, or when connection-level visibility is enough. It records connections only: there is no DNS (Domain Name System), DHCP (Dynamic Host Configuration Protocol) or TLS (Transport Layer Security) detail. See “What VNet Flow Logs can and cannot see” below.
The sensor signs in to the storage account with the VM’s managed identity. No account keys, passwords or connection strings are stored on the sensor.
Using vTAP and VNet Flow Logs together
Most environments use vTAP for most VMs and VNet flow logs only for the VMs vTAP cannot cover. In that case:
- Turn on flow logs for individual network interfaces of the VMs vTAP cannot cover, not for a whole subnet or virtual network. A connection between a vTAP-covered VM and a flow-logged VM is seen by both, so it is counted twice in Enigma AI. Keeping flow logs to those network interfaces keeps that overlap small.
- One sensor VM can receive the vTAP traffic and read the flow logs.
- One sensor can read flow logs from several virtual networks only if their address spaces do not overlap; use a separate sensor for each set of overlapping networks.
If no VM in the virtual network uses vTAP, you can turn on flow logs for the whole subnet or virtual network instead.
3.1 Create a storage account
- Navigate to Storage accounts in the Azure Portal and click + Create.
- Configure the storage account:
- Resource group: create new or use existing
- Storage account name: a unique, lowercase name. Note it down; the sensor needs it.
- Region: the same region as the virtual network of the VMs you want to monitor. Azure requires this.
- Performance: Standard (Premium is not supported for flow logs)
- Redundancy: Locally-redundant storage (LRS)
- Click Review + create, then Create.
3.2 Turn on VNet flow logs
- Search for Network Watcher in the Azure Portal and open it.
- Under Logs, select Flow logs, then click + Create.
- Configure the flow log:
- Flow log type: Network interface. (Choose Subnet or Virtual network only if no VM in it uses vTAP; see above.)
- Target resource: the network interface of each VM to monitor
- Traffic capture mode: Capture all traffic (the default). A filtered mode would leave connections out.
- Storage account: the account from step 3.1
- Retention (days): 2. The sensor reads records within minutes and catches up after up to 24 hours offline, so longer retention only adds storage cost.
- Traffic analytics: not needed by Enigma AI. Leave it off unless you use it yourself; it adds cost.
- Click Review + create, then Create.
- Repeat for each network interface you want to monitor.
Flow log records start appearing in the storage account within a few minutes of traffic.
3.3 Create the sensor VM
Use an existing Enigma AI sensor VM if you have one (for example, your vTAP collector), or create one:
- Navigate to Virtual Machines and click + Create > Azure virtual machine.
- Configure the VM:
- Virtual machine name: enigma-collector-vm (or your preferred name)
- Region: same as your monitored VMs
- Image: Ubuntu Server 24.04 LTS
- Size: B2s (minimum recommendation)
- Virtual network: a network that can reach the storage account
- Complete the VM creation process.
3.4 Give the sensor VM read access to the flow logs
- Open the sensor VM, select Security > Identity, set System assigned to On, and click Save.
- Open the storage account from step 3.1 and select Access control (IAM).
- Click + Add > Add role assignment.
- Select the Storage Blob Data Reader role and click Next.
- Under Assign access to, choose Managed identity, click + Select members, and select the sensor VM.
- Click Review + assign.
Role assignments can take a few minutes to apply.
The sensor VM must be able to reach the storage account over HTTPS (port 443). If the storage account’s firewall allows only selected networks:
- Under the storage account’s Networking, add the sensor VM’s virtual network and subnet.
- Keep Allow trusted Microsoft services to access this resource ticked, so Network Watcher can keep writing the flow logs.
3.5 Install and configure the Enigma AI sensor
- Install the sensor on the sensor VM using the Ubuntu/Debian Agent Install guide, with release v1.10.0 or later. To upgrade an existing sensor (for example your vTAP collector), run the installer from the new release the same way; it keeps the existing configuration.
- Edit
/etc/enigma-sensor/config.jsonand add the following section, with your storage account name:"azure_flow_logs":{"enabled":true,"storage_account":"yourstorageaccount","vnet_cidrs":"10.0.0.0/16"}- storage_account: the name from step 3.1, not the full URL
- vnet_cidrs: your virtual network’s address space, comma-separated if there are several. If you leave it empty, private address ranges are treated as your network.
"enabled": falsein the existing"capture"section. - Optional: if the monitored VMs serve traffic through a load balancer, add
lb_rulesso Enigma AI knows which service each port carries, for example"lb_rules": "10.0.2.0/24:443=ssl,10.0.2.0/24:80=http"(backend addresses, port, service). Flow logs do not identify protocols on their own. - Restart the sensor:
sudo systemctl restart enigma-sensor - Check the log:
sudotail -f /var/log/enigma-sensor/enigma-sensor.logYou should see a line like[flowlogs] Reading https://yourstorageaccount.blob.core.windows.net/insights-logs-flowlogflowevent every 60 seconds, and no “Poll failed” errors after the first few minutes.
What VNet Flow Logs can and cannot see
- Connections only: source and destination addresses and ports, protocol, timing, and packet and byte counts. There is no DNS, DHCP or TLS information for these VMs.
- Approximate detail: byte counts are estimates, and Azure does not say whether a connection was reset or closed normally.
- Service names (such as HTTP or SSL) come only from the
lb_rulesyou configure. - Connections are reported when they end, or every 60 minutes while a long-lived one stays open. Connections appear in Enigma AI within a few minutes.
- Not reported: connections Azure blocked from outside your network (mostly internet scanning), IPv6 traffic, and Azure load balancer health probes.
Storage cost
Azure charges for the flow log data collected (per GB) and for its storage; see Azure Network Watcher pricing. For a handful of VMs this is usually small. Traffic analytics is not needed.
Block D: Troubleshooting (replaces “NSG Flow Logs Issues”)
VNet Flow Logs Issues
- “HTTP 403” in the sensor log: the sensor VM’s managed identity does not have the Storage Blob Data Reader role on the storage account, the role assignment has not applied yet (wait a few minutes), or the storage account firewall does not allow the sensor VM’s network.
- “ManagedIdentityCredential” in the sensor log: the sensor VM has no managed identity. Turn on the system-assigned identity (step 3.4).
- “HTTP 404” in the sensor log: check the storage account name in
config.json. - No flow log data in Enigma AI: check that flow logs are turned on for the right network interfaces in Network Watcher, and that the storage account contains a container named
insights-logs-flowlogflowevent.
Block E: Comparison table column (replaces the “NSG Flow Logs” column)
| Feature | VNet Flow Logs |
|---|---|
| Data Captured | Connection records |
| Visibility | Medium (connections only) |
| Cost | Low |
| Deployment Complexity | Low |
| Resource Impact | Very Low |
| Storage Requirements | Low |
Also noticed on this page (not part of this change)
For DevOps to raise separately if wanted:
The overview and troubleshooting mention Packet Watcher (Option 2), but the page has no Option 2 section.
Options 1 and 3 say to use Ubuntu Server 20.04 LTS for the collector VM. The sensor installer refuses to run on 20.04 (end of life, and too old for the bundled Zeek). Supported: Ubuntu 22.04 and 24.04 LTS. Block C already uses 24.04.