Skip to content

Azure Log Analytics

This document provides an overview of Azure Log Analytics. In the Azure console, you can retrieve, inspect, and analyze log data using the Log Analytics services. Log Analytics provides a centralized location for log storage, analysis, and visualization, enabling you to monitor and troubleshoot your Azure environment effectively.


  • You must have a valid Azure subscription to access and use Azure Log Analytics.
  • You need to have an Azure Container Instances (ACI) or Azure Kubernetes Service (AKS) cluster where the CDC agent is deployed in a container. Ensure that the container is running and generating logs.
  • Create an Azure Log Analytics workspace or ensure that you have an existing workspace.
  • Enable container monitoring for the Azure Container Instances or Azure Kubernetes Service cluster where the CDC agent is deployed. This step ensures that the logs generated by the container are collected and forwarded to Azure Log Analytics.

Azure logs

To generate logs from Azure Log Analytics for a deployed CDC agent in an instance, you can follow these steps:

  1. Navigate to the Azure Portal. Enter your Azure account credentials to log in.
  2. Use the search bar at the top of the Azure Portal or navigate to the Log Analytics service from the services menu.
  3. In the Log Analytics dashboard, locate and click on the Log Analytics workspace associated with your CDC agent's logs. The workspace might have a name or pattern specific to your deployment.
  4. Once you are in the Log Analytics workspace, click Activity Log, where you can view logs generated by CDC agent. By default, you will see the Logs section where you can run queries and view log data.
  5. In the Logs section, you can write and execute queries using the Azure Monitor Query Language (KQL) to retrieve specific logs. You can filter logs based on time range, specific instance, or other relevant parameters.
  6. Queries example:

// Retrieve logs with specific table
  | project TimeGenerated, Message
- Where TimeGenerated and Message are fields from the ContainerInstanceLog_CL table. This query will retrieve the timestamp (TimeGenerated) and the log message (Message) from the logs generated by container instances.

  1. Use the query results to analyze the logs generated by your CDC agent. You can identify patterns, troubleshoot issues, and gain insights into the behavior of your deployment.
  2. Azure Log Analytics also allows you to create custom dashboards and set up alerts based on log data. These features can help you monitor and receive notifications for specific events or log conditions.

Azure Log Analytics