The Wayback Machine - https://web.archive.org/web/20241007065459/https://www.geeksforgeeks.org/microsoft-azure-firewall-network-flow-logs-with-timegenerated-using-kql/
Open In App

Microsoft Azure – Firewall Network Flow Logs with TimeGenerated using KQL

Last Updated : 31 Mar, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Here, In this article, we will be using the azure kql log queries to fetch the azure network flow logs traffic flowing through by setting the time using TimeGenerated in query. We will look into a few various examples and how we can use them to filter the results.

KQL Query Example 1:

To find the Azure network logs of Inbound and Outbound for the last 12 hours by projecting the TimeGenerated, Protocol, SourceIP, Target, Action, and Complete display message of Network flow log.

AzureDiagnostics
| where TimeGenerated > ago(12h)
| where Category == "AzureFirewallNetworkRule"
| parse msg_s with Protocol " request from " SourceIP " to " Target ". Action: " Action
| project TimeGenerated, Protocol, SourceIP, Target, Action, Complete_MSG=msg_s

Output:

KQL Query Example 2:

To find the Azure network logs of Inbound and Outbound for the last 5 minutes by projecting the TimeGenerated, Protocol, SourceIP, Target, Action, and Complete display message of Network flow log.

AzureDiagnostics
| where TimeGenerated > ago(5m)
| where Category == "AzureFirewallNetworkRule"
| parse msg_s with Protocol " request from " SourceIP " to " Target ". Action: " Action
| project TimeGenerated, SourceIP, Target, Action, msg_s

Output:

KQL Query Example 3:

To find the Azure network logs of Inbound and Outbound for the last 7 days by projecting the TimeGenerated, Protocol, SourceIP, Target, Action, and Complete display message of Network flow log.

AzureDiagnostics
| where TimeGenerated > ago(7d)
| where Category == "AzureFirewallNetworkRule"
| parse msg_s with Protocol " request from " SourceIP " to " Target ". Action: " Action
| project TimeGenerated, SourceIP, Target, Action, msg_s

Output:

KQL Query Example 4:

To find the Azure network logs of Inbound and Outbound with time range using between keyword and to projecting the TimeGenerated, Protocol, SourceIP, Target, Action and Complete display message of Network flow log.

AzureDiagnostics
| where TimeGenerated between(datetime("2022-01-05 00:00:00") .. datetime("2022-01-08 12:00:00"))
| where Category == "AzureFirewallNetworkRule"
| parse msg_s with Protocol " request from " SourceIP " to " Target ". Action: " Action
| project TimeGenerated, SourceIP, Target, Action, msg_s

Output:


Previous Article
Next Article

Similar Reads

Microsoft Azure - Azure Firewall Flow Logs From Select Source IP
In this article, we will be find Azure Firewall Network Flow traffic of Inbound or Outbound from Select Source IP Address by using KQL Query by using the following three scenarios. Case 1: KQL Query to find the Azure Firewall Network Logs from Select Source IP Address projecting all the properties of Time Generated, Source IP Address, Target IP Add
2 min read
Microsoft Azure - Enabling Logs for Troubleshooting the Azure Firewall Rules
Azure Firewall Diagnostic settings are used to configure logs and metrics for a resource to the destination of Log Analytics Workspace. Pre-requisites: Azure Firewall ResourceLog Analytics Workspace which is configured for monitoring your Azure resources.Implementation: Step 1: Login to Azure Portal Step 2: Search for Firewalls from azure global se
1 min read
Microsoft Azure - Azure VM Disk Space in Percentage using Azure KQL
Here we'll be using the Azure Insights Metric Query to find the free disk space in percentage using KQL. The purpose of this query is to find disk drive free space of all the Azure VMs without logging into every server. You can Run the following KQL log Queries in Azure Monitor or Azure VM Logs or Log Analytics Workspace. Note: VM Insights Agent sh
1 min read
Microsoft Azure - Query Azure Storage Logs in Azure Monitor Log Analytics
Pre-requisite:- Azure Log Analytics is a tool offered by Azure, which is used to edit and run log queries against data in the Azure Monitor Logs store and helps interactively analyze their results. One can easily use Log Analytics queries to retrieve records that match particular criteria, identify trends, analyze patterns, and provide various insi
5 min read
Microsoft Azure - Export the List of Azure Storage Services using KQL
Pre-requisite: Azure In this article, we will show you how to export the information of Azure Storage Services by using KQL (Kusto Query Language) resource graph query to retrieve within a subscription in simple and easy steps. We will be using Azure native service called Azure Resource Graph Explorer to retrieve the information. To retrieve the in
2 min read
Microsoft Azure - Query System Event Log Data Using Azure KQL
Here in this article, we will find the system event log data of both windows and Linux machines from log analytics data sources using the Kusto Query Language (KQL). System Event Logs that are captured could be retrieved using the KQL event operator. KQL Event operator helps users to troubleshoot Windows or Linux system failures, warnings, and othe
2 min read
Microsoft Azure - Tracking Memory Utilization of Azure VM using KQL Log Query
In this article, we will look into the process of finding the Minimum, Average, and Maximum Memory Utilization of all Azure Virtual Machines using KQL Log Query. Here we are Perf KQL Counter Operator which is used to find Azure Virtual Machines performance from collected data logs. Implementation: Follow the below steps to Run the Log Queries. Step
4 min read
Microsoft Azure - Track CPU Utilization of a Azure Virtual Machines using KQL Log Query
In this article, we will look into the process of finding the Minimum, Average, and Maximum CPU Utilization of all Azure Virtual Machines using KQL Log Query. Here the Perf KQL Counter Operator is used to find Azure Virtual Machines performance from collected data logs. Implementation: Follow the below steps to Run the Log Queries. Step 1: Log in t
4 min read
Microsoft Azure - Check Resource Owner in Azure using KQL
In this article, we will see how we can find the creation date of resources by using the Kusto Query Language. Azure KQL Queries helps in finding the resource creation date, time, created user email,...etc. Note: You cannot retrieve log data if it is more than 90 days using KQL. In this case store log data to a storage account to fetch the logs for
2 min read
Microsoft Azure - Query Application Event Log Data using Azure KQL
Here in this article, we will find the application event log data from log analytics data sources using the custom query language(KQL). Application Event Logs that are captured should be retrieved using the KQL event operator. This KQL Event operator helps users to troubleshoot the application failures, warnings, and other informational sources for
2 min read
Microsoft Azure - Troubleshoot Azure VM Process using KQL
Azure is Microsoft’s cloud platform, just like Google has its Google Cloud and Amazon has its Amazon Web Service or AWS.000. Generally, it is a platform through which we can use Microsoft’s resources. In this article, we will be using the VMProcess Kusto query operator in Azure Monitor to collect the Process data of azure servers/virtual machine cl
2 min read
Microsoft Azure - Using KQL in Various Methods With Azure Tools
Here in this article, you will be learning about various methods of using Kusto queries or KQL queries in different methods to retrieve the resource properties. Before we get into examples, let see what is Kusto Query Language. Kusto Query Language, also known as KQL. It is an Azure native tool to explore your data and discover patterns, identify a
2 min read
Microsoft Azure - Find or Export Azure Compute Images using KQL
Pre-requisite: Azure In this article, we will show you how to find the azure compute images in your Azure environment using KQL (Kusto Query Language) resource graph queries. You can run all the below example queries by accessing Azure Resource Graph Explorer from Azure Portal. In order to read resources in Azure using KQL (Kusto Query Language) on
2 min read
Microsoft Azure - Enable Linux System Logs in Azure for Monitoring
Log Analytics is an Azure service that collects and stores information/data from a set of different sources and we can use Log Analytics queries to retrieve records that match particular criteria, identify trends, analyze patterns, and provide a variety of insights into our data. Enable and Collect Linux Syslog from Log Analytics agents at custom i
1 min read
Microsoft Azure - Enable Windows Event Logs in Azure for Monitoring
Log Analytics is an Azure service that collects and stores information/data from a set of different sources and we can use Log Analytics queries to retrieve records that match particular criteria, identify trends, analyze patterns, and provide a variety of insights into our data. Enable Windows Event Logs to collect log data from standard logs, lik
1 min read
Microsoft Azure - Create Pie Charts For Orphaned Resources using KQL
Workbooks allow monitoring data to be presented as charts. It supports charts for both logs and metric data sources. Orphaned resources are those resources that are not handled when an associate VM is deleted. To learn more about querying Azure resources using KQL, take a look at this article. In this article, we will look into the process of repre
2 min read
Microsoft Azure - Get Management Groups Information Using KQL
In this article, you will get to know how you can get information about azure management groups using the azure resource graph queries in a faster and simple way. Run all the below following KQL queries in Azure Resource Graph Explorer from Azure Portal to get the results. You can also export the data by clicking on Download as CSV from the Results
2 min read
How to Configure Azure Activity "Administrative" Logs on Azure Subscription using PowerShell?
Azure Activity "Administrative" logs are a type of activity log that record events that occur in your Azure subscription. By enabling and configuring the Azure Activity "Administrative" logs will collect and store logs in your specified log analytics workspace (this is your log destination). Administrative logs help you to view and analyze the logs
3 min read
Microsoft Azure - KQL Query to Get the VM Computer Properties
In this article, we will be using the KQL queries to fetch the data ingested logs from Azure Monitor or Azure Log Analytics Workspace to get the complete details or properties of the Azure Server across subscriptions at once using the simple KQL queries. Let's get started.VMComputer is a KQL Operator to collect Inventory data for servers by the Ser
2 min read
Microsoft Azure - Heartbeat KQL Log Monitoring Query
Pre-requisites: Microsoft Azure – Troubleshoot Azure VM Process using KQL Microsoft Azure – Track CPU Utilization of Azure Virtual Machines using KQL Log Query Heartbeat is an Azure Log Management solution and you can get/fetch the below following information from the KQL Log Heartbeat query.: Computer NameAn Environment that hosts the computer: Az
2 min read
Microsoft Azure - Get Azure VM Properties using Azure PowerShell
The purpose of using the Azure PowerShell Commands is to quickly analyze the overall properties of VM/VMs at once the filtering the with select and where conditions. To find the properties of an Azure VM, you can perform the following commands in Azure Cloud Shell to get the details. Command: Get-AzVM Output: 1. Get all properties of an Azure Virtu
2 min read
Microsoft Azure - RDP to Azure Virtual Machines using Azure Bastion
In this article, we will learn how to do RDP(Remote Desktop Protocol) / SSH(Secure Shell) Connection to an Azure VM using Azure Bastion. First, let's discuss Azure Bastion. The Azure Bastion service is a fully platform-managed PaaS service that you provision inside your virtual network. It provides secure and seamless RDP/SSH connectivity to your v
3 min read
Microsoft Azure - Check Status of Azure VM using Azure PowerShell
The following Azure PowerShell command helps you to find the Azure VM Config and properties details of Os Name, Os Version, Hyper V Generation, Disks properties, Extensions properties of Type Handler Version, Status and Message, VM Agents properties of Type Handler Version, Status and Message and also VM Power Status Codes, Messages, Plugins, Time
3 min read
Microsoft Azure - Manage Azure VMs using Azure PowerShell Commands
Here we are using Azure PS Commands to manage azure resources from Azure Cloud Shell or by using Windows PowerShell. By using the simple AZ PS command we can manage Azure VM Quicks without any efforts of navigating in Azure Portal and at Scale. Let's get started by using the major Azure PS commands to manage Azure Virtual Machine. 1. Start a Specif
2 min read
Microsoft Azure - Enable IIS Logs for Monitoring
Log Analytics is an Azure service that collects and stores information/data from a set of different sources and we can use Log Analytics queries to retrieve records that match particular criteria, identify trends, analyze patterns, and provide a variety of insights into our data. Internet Information Services (IIS) stores user activity in the form
1 min read
Microsoft Azure - Application Gateway Incoming Access Logs
Pre-requisites: Introduction to Microsoft Azure | A cloud computing service In this article, you will be learning about how to fetch the requests of azure application gateway incoming access logs using azure Kusto query language (KQL). Here in this article, we will be finding the requests of app gateway errors, Non-SSL requests on the Application G
2 min read
How To Check Usage of Data Logs in Microsoft Azure?
Pre-requisites: Azure and Microsoft Azure – Configuring Log Analytics Data Retention In this article, we will show you how to check the usage of data ingestion logs of your Azure resources from the azure portal in simple easy steps. To view the services in azure you should require an RBAC Contributor for any read-write change or RBAC reader access
2 min read
How to Find AMA Agent Installed on Azure Virtual Machines using KQL Query?
Azure Monitor Agent simply known as AMA. It is a software agent that collects monitoring data from Windows and Linux machines, in Azure and non-Azure environments, including on-premises and third-party clouds. Basically, there are two types of AMA agents: Azure Monitor Agent for Windows installed for Azure Windows Servers. This collects data from W
4 min read
Microsoft Azure - Configure Azure SQL with Azure CLI
In this article, we're going to take a closer look at how you can configure something like connectivity using the Azure CLI. What we have here is we are in Azure Data Studio and similar to the SQL notebook we are actually using a PowerShell notebook. That just means all our code cells are going to run PowerShell and we are just connecting to localh
4 min read
Microsoft Azure - Get CPU Utilization Data of a Azure VM in Azure Portal
Azure Virtual Machines (VM) is one of several types of on-demand, scalable computing resources that Azure offers. In this article, we will look into the process of getting the CPU Utilization data of an Azure VM in Azure Portal. Implementation: Follow the steps to get the CPU Utilization of an Azure VM in Azure Portal: Step 1: Log in to your Azure
2 min read