Cotool + Azure Blob Storage Logs
Ingest Azure Network Watcher VNet flow logs and other JSON logs from Blob Storage into Cotool as Event Grid announces each blob, with no stored keys or secrets.
The short answer
The Azure Blob Storage integration pulls log files out of your storage containers as they are written: Network Watcher virtual network flow logs, plus any JSON logs you or another product export there. Event Grid announces each new blob or flow log block on a Storage queue, and Cotool drains it every minute into Cotool Logs for search and detections.[1]
How it connects: Cotool signs in as a user-assigned managed identity in your tenant through a federated identity credential, so no client secret or storage key is created. Event Grid delivers Microsoft.Storage.BlobCreated events to a queue dedicated to Cotool, which pulls them on its own schedule and reads the announced blobs.[1][8][9][11]
What Cotool uses from Azure Blob Storage Logs
- VNet flow logs
- Virtual network flow logs, and legacy NSG flow logs, land in
azure_flow_logsas one row per flow tuple, with source and destination IP and port, protocol, direction, flow state, encryption, packet and byte counters, the matched rule, and geolocation and threat-feed labels for the remote peer.[1][7] - Generic JSON
- Other JSON logs go to
azure_generic_logswith their original payload, top-level fields as a searchable map, and the blob they came from. They aren't normalized, and no detection coverage is implied.[1] - Custom formats normalized to OCSF
- JSON records can instead be mapped to an OCSF class with a normalization configuration you publish, and indexed with typed columns in
azure_ocsf_events. Records that fail are quarantined on the source for replay.[1]
Detections, hunts, and triage
- Detect exposed management and database portsDetection
- Azure detections in Cotool's library read
azure_flow_logsfor internet access to management and database ports, scans followed by an allowed connection, denied bursts, threat-listed addresses, and DNS sent to unapproved resolvers. Agents investigate each alert they raise.[1][5] - Triage traffic with a threat-listed addressTriage
- An agent pulls every flow between the virtual network and the listed address, checks which rule allowed or denied it and whether bytes moved, and records whether the connection was expected.[1][6]
- Hunt for denied traffic from one hostHunt
- Denied flows are indexed by default, so a hunt can find a workload with repeated internal or outbound denies over days, the same pattern the library's denied-burst detections look for in shorter windows.[1]
Example query
SELECT event_time, src_ip, dst_ip, dst_port, rule, geo_country_name
FROM azure_flow_logs
WHERE src_ip_is_private = false
AND is_denied = false
AND dst_port IN (22, 3389)
AND event_time > now() - INTERVAL 1 DAY
ORDER BY event_time DESC
LIMIT 100Cotool Logs uses ClickHouse SQL. Check the column names in Log Search before reusing this, and keep a time filter and a LIMIT on exploratory queries.[1][3]
Setup and permissions
Cotool generates Terraform or an Azure CLI script that creates the dedicated queue, an Event Grid system topic and subscription per storage account, and a managed identity whose federated credential trusts only Cotool's subject and your organization's audience.[1][11]
| Permission | Access | Why |
|---|---|---|
| Storage Queue Data Message ProcessorLets the managed identity peek, retrieve, and delete messages on the Cotool queue.[1][10] | Write | Lets the managed identity peek, retrieve, and delete messages on the Cotool queue.[1][10] |
| Storage Blob Data ReaderLets the managed identity read and list blobs, assigned on each log container.[1][10] | Read | Lets the managed identity read and list blobs, assigned on each log container.[1][10] |
| Storage Queue Data Message SenderGiven to each Event Grid system topic's managed identity so it can add messages to the queue.[1][9][10] | Write | Given to each Event Grid system topic's managed identity so it can add messages to the queue.[1][9][10] |
- Use a queue dedicated to Cotool. Cotool deletes messages once their blobs are ingested, so a shared queue would take messages away from another tool.[1]
- Network Watcher appends a block to each hourly flow log blob about once a minute. Cotool stores how far it has read each blob and reads only the new bytes.[1][7]
- The storage accounts must allow public network access; Cotool can't reach accounts that only accept private endpoints.[1]
How Cotool works with Azure Blob Storage Logs
- Cotool added managed log ingestion for Azure VNet flow logs in release 0.75.0.[4]
- By default Cotool indexes denied flows, and flow begin and end tuples that involve a public IP. Continuation tuples and allowed private-to-private traffic stay in the raw archive.[1]
- Rereading a blob doesn't create duplicates: flow tuples are keyed by blob and byte position, and JSON records by blob, content hash, and position.[1]
FAQ
- Should Azure diagnostic-setting archives go through Blob Storage or Event Hub?
- Event Hub. Azure Monitor diagnostic-setting archives are appended to through the hour, and a blob written again under the same name is read again in full, so Cotool recommends streaming them through the Azure Event Hub integration.[1][2]
- Which file formats does the Azure Blob Storage integration read?
- Generic JSON and OCSF sources read JSON, JSON arrays, newline-delimited JSON, and gzip-compressed versions of each, written once as block blobs of at most 100 MB. Append blobs and formats such as Parquet are reported on the source instead of ingested.[1]
Sources
- Azure Blob Storage Log Ingestion (Cotool docs) · accessed November 22, 2026
- Azure Event Hub Integration (Cotool docs) · accessed November 22, 2026
- Search Logs (Cotool docs) · accessed November 22, 2026
- Changelog (Cotool docs) · accessed November 22, 2026
- Detections are code (Cotool Detect) · accessed November 22, 2026
- Respond to every signal (Cotool Respond) · accessed November 22, 2026
- Virtual network flow logs (Azure Network Watcher docs) · accessed November 22, 2026
- Reacting to Blob storage events (Microsoft Learn) · accessed November 22, 2026
- Storage queue as an event handler for Event Grid events (Microsoft Learn) · accessed November 22, 2026
- Azure built-in roles for Storage (Microsoft Learn) · accessed November 22, 2026
- Configure a user-assigned managed identity to trust an external identity provider (Microsoft Learn) · accessed November 22, 2026


