Steps for Changing Azure Log Analytics Retention Period (2024)

This optimization involves customizing retention periods for different log types based on their criticality and ensuring that you adhere to any regulatory compliance requirements.

What is Azure Log Analytics?

The Azure Log Analytics tool is used to edit and run the log queries. This tool analyzes the result of the data which is gathered by Azure Monitor logs. Log Analytics queries let you find trends, identify patterns, and extract a variety of operational insights from your data by retrieving records that meet specific criteria.

What is Azure Log Analytics Workspace?

Log Analytics Workspace is a dedicated container of the Azure environment. It is primarily designed for storing log data from Azure Monitor and other Azure services. Microsoft Sentinel and Defender for Cloud are examples of Azure services. As each workspace has its own configuration and data repository from several services can be combined.

In essence, Azure Log Analytics is the service that powers log management, while the Azure Log Analytics Workspace functions as the dedicated storage and analysis environment for your log data.

Log Analytics Retention Period: Optimizing Storage for Your Needs

The concept of Log Analytics retention period refers to the duration for which data is stored within your Log Analytics Workspace. This timeframe plays a crucial role in balancing cost-efficiency and data availability for effective application monitoring. Typically Azure Log Analytics

Retention Period is up to 90 days. However, it can be extended and customized. The cost of Log Analytics depends on the pricing tier, data retention, and solution requirements.

When you adjust or decrease the log analytics retention setting in Azure Monitor, the data will be stored for 30 days before it is completely deleted. It allows users to undo the changes and prevent data loss due to configuration errors. However, if it is necessary, the data can be deleted immediately. Likewise, if the user increases the log analytics retention setting, it will apply to all existing data in the table that has not been deleted yet.

When archive settings are modified the data and pertinent data stored in the table will be affected immediately. Through the Azure portal, you can configure a Log Analytics workspace’s default retention duration to anywhere between 30 and 730 days.

It’s important to distinguish between retention and archive settings. While retention determines how long data is stored within the workspace, archive settings define how long data is accessible for querying after it’s purged from the primary storage. Any modifications to archive settings take effect immediately for the affected data tables. To change the data retention term, you must upgrade to the premium tier.

Step 1: Log into the Azure Portal.

Step 2: Navigate to Log Analytics Workspace (select your workspace).

Step 3: Under General>> Click Usage and Estimated Costs.

Steps for Changing Azure Log Analytics Retention Period (1)

Step 4: Under usage and estimated cost select data retention.

Steps for Changing Azure Log Analytics Retention Period (2)

Data retention by default is set as 30 days you can change it according to your need.

Steps for Changing Azure Log Analytics Retention Period (3)

Note: Insight data types are retained for 90 days by default, using workspace retention if they are over 90 days old.

Step 5: Click OK to save your changes.

If you want to set the different retention period table, then follow the below steps.

A list of important factors to consider when retaining data.

Changing the retention at the workspace level will change the table retention any longer on the one previously modified for this, you will need to use some simple ARM commands.

  1. To continue we need to know the resource id first to retrieve the Log Analytics workspace resource id.
  2. To get that id navigate to resource explorer.
  3. Under resource explorer.
  4. Select your subscription and then select the resource group.

Steps for Changing Azure Log Analytics Retention Period (4)

Step 6: Once you get the resource explorer click on subscription and then navigate all the resources till the one you want to operate on.

Steps for Changing Azure Log Analytics Retention Period (5)

Step 7: Now that we have the workspace resource-id, you just need to add the table name and API information to run the necessary command.

By running the GET command throughARMClient, passing the resource id

ARMClient.exe get “/subscriptions/9df78e42-893b-4152-b04ff80674a99c67/resourceGroups/SmartAppsCOM-rg/providers/Microsoft.OperationalInsights/workspaces/sa-production-loganalytics/Tables/AzureDiagnostics?api-version=2017-04-26-preview”

Now that we have the workspace resource-id, you just need to add the table name and API information to run the necessary command.

Steps for Changing Azure Log Analytics Retention Period (6)

Step 8: Now when we get the retention period we can set the retention according to our need by below the ARM command.

ARMClient.exe put “/subscriptions/9df78e42-893b-4152-b04f-f80674a99c67/resourceGroups/SmartAppsCOM-rg/providers/Microsoft.OperationalInsights/workspaces/sa-production-loganalytics/tables/InsightsMetrics?api-version=2017-04-26-preview” “{‘properties’:{‘retentionInDays’:7}}”

Steps for Changing Azure Log Analytics Retention Period (7)

Step 9: But if you want to set it back. You can use a null value. Use below command

ARMClient.exeput”/subscriptions/9df78e42-893b-4152-b04f-f80674a99c67/resourceGroups/SmartAppsCOM-rg/providers/Microsoft.OperationalInsights/workspaces/sa-production-loganalytics/Tables/InsightsMetrics?api-version=2017-04-26-preview” “{‘properties’:{‘retentionInDays’:null}}”

We are done with the retention period.

Optimizing Log Analytics Retention for Cost-Effective Monitoring

Optimizing Log Analytics retention in Azure is crucial for effective data management and cost control. The balance between cost-efficiency and data availability empowers businesses to make informed decisions regarding application health. Organizations can even customize their data retention strategies to meet specific requirements by changing retention settings at both the workspace and table levels. This ensures that valuable insights are retained while minimizing unnecessary storage costs.

If your business struggling with Log Analytics retention and seeking a log management solution. Then you’ve come to the right place. For all you need, seasoned engineers at MoreYeahs provide Microsoft Azure Consulting Services and help you meet the highest standards of performance.

Let’s Connect.

FAQ

If you want to change the default retention policy in Log Analytics Workspace here are the steps:

  • •Select your workspace in the Azure Portal
  • •Go to General Settings
  • •Modify the data retention duration to suit your needs

The default retention policy for log analytics workspace is usually 30 days. However, it can be altered and expanded as per the unique requirements.

The default retention policy for log analytics workspace is usually 30 days. However, it can be altered and expanded as per the unique requirements.

Log retention is essential for compliance, auditing, troubleshooting, and historical analysis purposes. It makes sure that log data are kept for the specified time which helps businesses meet regulatory requirements and gather insights about system behavior over time.

Depending on the log source and configuration the default log retention hours can be changed. Logs are typically stored for 720 hours however; this can be changed as per the requirement to meet Azure Log Analytics Retention Time.

Must Read the Other Articles on Azure:

Steps for Changing Azure Log Analytics Retention Period (2024)
Top Articles
4 Best Hypoallergenic Carpets & Rugs for Allergy Sufferers
Entrepreneurial Ecosystems
Www.metaquest/Device Code
RuneScape guide: Capsarius soul farming made easy
Hay day: Top 6 tips, tricks, and cheats to save cash and grow your farm fast!
Ucf Event Calendar
What’s the Difference Between Cash Flow and Profit?
Unit 1 Lesson 5 Practice Problems Answer Key
The Connecticut Daily Lottery Hub
Hillside Funeral Home Washington Nc Obituaries
Nj Scratch Off Remaining Prizes
Inevitable Claymore Wow
Studentvue Columbia Heights
Telegram Scat
Puretalkusa.com/Amac
Uky Linkblue Login
Everything you need to know about Costco Travel (and why I love it) - The Points Guy
Nurse Logic 2.0 Testing And Remediation Advanced Test
Sizewise Stat Login
Persona 5 Royal Fusion Calculator (Fusion list with guide)
EASYfelt Plafondeiland
Rs3 Eldritch Crossbow
Winco Employee Handbook 2022
Academy Sports Meridian Ms
Surplus property Definition: 397 Samples | Law Insider
Il Speedtest Rcn Net
Impact-Messung für bessere Ergebnisse « impact investing magazin
Watson 853 White Oval
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Frommer's Belgium, Holland and Luxembourg (Frommer's Complete Guides) - PDF Free Download
Chapaeva Age
Newsday Brains Only
Federal Student Aid
Sinai Sdn 2023
Temu Y2K
Kornerstone Funeral Tulia
Tryst Houston Tx
Shane Gillis’s Fall and Rise
Henry Ford’s Greatest Achievements and Inventions - World History Edu
Lovely Nails Prices (2024) – Salon Rates
Seven Rotten Tomatoes
Craigslist Odessa Midland Texas
Saline Inmate Roster
QVC hosts Carolyn Gracie, Dan Hughes among 400 laid off by network's parent company
Az Unblocked Games: Complete with ease | airSlate SignNow
Air Sculpt Houston
Cara Corcione Obituary
Star Sessions Snapcamz
Michaelangelo's Monkey Junction
How to Get a Check Stub From Money Network
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 6327

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.