Query data from Basic Logs in Azure Monitor - Azure Monitor (2024)

  • Article

Basic Logs tables reduce the cost of ingesting high-volume verbose logs and let you query the data they store using a limited set of log queries. This article explains how to query data from Basic Logs tables.

For more information, see Set a table's log data plan.

Permissions required

You must have Microsoft.OperationalInsights/workspaces/query/*/read permissions to the Log Analytics workspaces you query, as provided by the Log Analytics Reader built-in role, for example.

Limitations

Queries with Basic Logs are subject to the following limitations:

KQL language limits

Log queries against Basic Logs are optimized for simple data retrieval using a subset of KQL language, including the following operators:

You can use all functions and binary operators within these operators.

Time range

Specify the time range in the query header in Log Analytics or in the API call. You can't specify the time range in the query body using a where statement.

Query context

Queries with Basic Logs must use a workspace for the scope. You can't run queries using another resource for the scope. For more information, see Log query scope and time range in Azure Monitor Log Analytics.

Concurrent queries

You can run two concurrent queries per user.

Purge

You can’t purge personal data from Basic Logs tables.

Run a query on a Basic Logs table

Creating a query using Basic Logs is the same as any other query in Log Analytics. See Get started with Azure Monitor Log Analytics if you aren't familiar with this process.

  • Portal
  • API

In the Azure portal, select Monitor > Logs > Tables.

In the list of tables, you can identify Basic Logs tables by their unique icon:

Query data from Basic Logs in Azure Monitor - Azure Monitor (1)

You can also hover over a table name for the table information view, which will specify that the table is configured as Basic Logs:

Query data from Basic Logs in Azure Monitor - Azure Monitor (2)

When you add a table to the query, Log Analytics will identify a Basic Logs table and align the authoring experience accordingly. The following example shows when you attempt to use an operator that isn't supported by Basic Logs.

Query data from Basic Logs in Azure Monitor - Azure Monitor (3)

Pricing model

The charge for a query on Basic Logs is based on the amount of data the query scans, which is influenced by the size of the table and the query's time range. For example, a query that scans three days of data in a table that ingests 100 GB each day, would be charged for 300 GB.

For more information, see Azure Monitor pricing.

Next steps

Query data from Basic Logs in Azure Monitor - Azure Monitor (2024)

FAQs

How do you access data collected by an Azure Monitor query? ›

The Log Analytics user interface in the Azure portal helps you query the log data collected by Azure Monitor so that you can quickly retrieve, consolidate, and analyze collected data.

What is the difference between analytic logs and basic logs? ›

Analytic logs should be used for high value security data that requires scheduled monitoring and alerting. Since Basic logs have a 8 days log retention, Archive logs should be used to store the basic logs for a longer duration - to increase the scope of threat hunting when it is required.

How to see Azure Monitor logs? ›

In the Azure portal, select Monitor > Workbooks. In the Insights section, select Activity Logs Insights. At the top of the Activity Logs Insights page, select: One or more subscriptions from the Subscriptions dropdown.

What is the data retention of basic logs table plan? ›

For a Basic Logs table, the value is always 8. The table's total data retention including archive period. This value can be between 4 and 730; or 1095, 1460, 1826, 2191, 2556, 2922, 3288, 3653, 4018, or 4383.

Does Azure Monitor collect logs? ›

Azure Monitor Logs is a feature of Azure Monitor that collects and organizes log and performance data from monitored resources.

How to check logs in Azure Log Analytics? ›

Sign in to the Azure portal. Select Monitor from the left pane in the Azure portal. Under the Insights Hub section, select Log Analytics Workspace Insights.

What is the difference between Azure log Analytics and Azure monitor logs? ›

In conclusion, Azure Monitor and Log Analytics collectively offer a robust solution for monitoring Azure resources. While Azure Monitor provides a lot of features including aggregation of logs, real-time insights and performance metrics, Log Analytics allows advanced query capabilities and extensive log data analysis.

What is the basic log analysis? ›

Log analysis is the process of reviewing computer-generated event logs to proactively identify bugs, security threats or other risks. Log analysis can also be used more broadly to ensure compliance with regulations or review user behavior.

What are basic logs in Azure? ›

All logs in the Azure Monitor Logs platform are stored as analytics logs by default. The default retention period of these logs is 30 days (or 90 days for certain logs), but this can be extended up to two years. For analytics logs, you have the full capabilities of the KQL to perform comprehensive analytics operations.

What type of logs are Azure Monitor? ›

Azure Monitor resource logs are logs emitted by Azure services that describe the operation of those services or resources. All resource logs available through Azure Monitor share a common top-level schema. Each service has the flexibility to emit unique properties for its own events.

What are Azure Monitor logs? ›

The Azure Monitor activity log is a platform log that provides insight into subscription-level events. The activity log includes information like when a resource is modified or a virtual machine is started.

What two types of data are used by an Azure Monitor? ›

Observability data in Azure Monitor. Metrics, logs, and distributed traces are commonly referred to as the three pillars of observability. A monitoring tool must collect and analyze these three different kinds of data to provide sufficient observability of a monitored system.

How long are Azure logs retained? ›

By default Application Insights and Log Analytics has a data retention of 90 days. You can opt to extend the retention up to 730 days. However, the tyGraph Pages Site Analytics web part only support a maximum of 365 day filters.

How long should log data be retained? ›

A log retention period is the amount of time you keep logs. For example, you may keep audit logs and firewall logs for two months. However, if your organization must follow strict laws and regulations, you may keep the most critical logs anywhere between six months and seven years.

How do I change log analytics to basic? ›

From the Log Analytics workspaces menu, select Tables. The Tables screen lists all the tables in the workspace. Select the context menu for the table you want to configure and select Manage table. From the Table plan dropdown on the table configuration screen, select Basic or Analytics.

How do I retrieve data from Azure? ›

Sign in to the Azure portal and in the left pane, select Virtual machines. From the list of virtual machines, select the virtual machine to open that virtual machine's dashboard. In the virtual machine's menu, select Backup to open the Backup dashboard. In the Backup dashboard menu, select File Recovery.

What data is collected by Azure Monitor? ›

Data collection in Azure Monitor

Specific advantages of the new data collection include the following: Common set of destinations for different data sources. Ability to apply a transformation to filter or modify incoming data before it's stored. Consistent method for configuration of different data sources.

How do I access data in Azure SQL Database? ›

Connect to your database within the query editor.
  1. Navigate to your SQL database in the Azure portal. For example, visit your Azure SQL dashboard.
  2. On your SQL database Overview page, select Query editor (preview) from the resource menu.
  3. On the sign-in screen, provide credentials to connect to the database.
Apr 16, 2024

Where is Azure Monitor data stored? ›

Data storage

For Azure Monitor: Metrics data is stored in the Azure Monitor metrics database. Log data is stored in the Azure Monitor logs store. Log Analytics is a tool in the Azure portal that can query this store.

Top Articles
Latest Posts
Article information

Author: Rueben Jacobs

Last Updated:

Views: 5955

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Rueben Jacobs

Birthday: 1999-03-14

Address: 951 Caterina Walk, Schambergerside, CA 67667-0896

Phone: +6881806848632

Job: Internal Education Planner

Hobby: Candle making, Cabaret, Poi, Gambling, Rock climbing, Wood carving, Computer programming

Introduction: My name is Rueben Jacobs, I am a cooperative, beautiful, kind, comfortable, glamorous, open, magnificent person who loves writing and wants to share my knowledge and understanding with you.