Azure KQL

Azure KQL

- 1 min

INTRODUCTION
Kusto Query Language (KQL) is used to log information on services running in Azure. KQL is a read-only request used to process data and return results. It is important to know how to be able to use Kusto in order to retrieve, consolidate, and analyze data in Azure. Below you will find a quick guide on how to execute a KQL statement. Here are some commonly used query examples for reference.


A couple of things:

  1. KQL consists of seuence of query statements, delimited by a semincolon. Atleast 1 statement = 1 tabluar expresssion statement. A tabular expression statement formats the data arranged as a table of cloumns and rows.
  2. KQL is case-senstive.

OVERVIEW

  1. Go to Azure Portal. Authenticate.
  2. Go to your Log Analytics Workspace.
  3. Select Logs under General.

  4. 01selectLogs
  5. Run the following command to check for computers with unhealthy latency (or, go here and choose another query you'd like to run):
  6. 	NetworkMonitoring 
    | where LatencyHealthState <> "Healthy" 
    | where Computer != "" 
    | distinct Computer
    
  7. If successful, you will see Completed under Results.

computersWithUnhealthyLatency

Conclusion

From here, you can do a number of other things, such as: add a new alert rule to the query or export the query results to a .csv. You can even modify your query to render a barchat or graph with its output. If your company has a multi-cloud environment and you are using Azure Sentinel to tie these environments together, KQL is a need-to-know. With a strong KQL foundation in a multi-cloud environment you will have the ability query logs from a different cloud without leaving the Azure console (i.e., query AWS Cloudwatch logs). So, as you can see, understanding how to use KQL is essential when it comes to navigative data in Azure; even more so if you a have multi-cloud environment with a Azure Sentinel setup.


Tip: if you are looking for an AV Endpoint Solution, Sophos integrates well with Azure Sentiel queries.

comments powered by Disqus
rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora