Steps for Changing Azure Log Analytics Retention Period
6 MIN READLog analytics retention plays a critical role in enabling businesses to make data-driven decisions regarding application health. By storing and analyzing historical logs, organizations can gain valuable insights into application performance, identify potential issues, and proactively address them.
Microsoft Azure offers a comprehensive log management solution called Azure Log Analytics. This service centralizes log data from diverse sources within Azure environment, empowering to analyze and interpret this data using a powerful query language.
However, keeping all logs indefinitely can become expensive and create storage management challenges. Optimizing your Azure Log Analytics retention strategy is crucial in order to balance cost-effectiveness with retaining valuable historical data for troubleshooting and trend analysis.
What is Azure Log Analytics?
What is Azure Log Analytics Workspace?
Log Analytics Retention Period: Optimizing Storage for Your Needs
Here are the steps for the Log Analytics Retention Period:
Step 2: Navigate to Log Analytics Workspace (select your workspace).
Step 3: Under General>> Click Usage and Estimated Costs.
- To continue we need to know the resource id first to retrieve the Log Analytics workspace resource id.
- To get that id navigate to resource explorer.
- Under resource explorer.
- Select your subscription and then select the resource group.
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.
Step 9: But if you want to set it back. You can use a null value. Use below command
We are done with the retention period.
Optimizing Log Analytics Retention for Cost-Effective Monitoring
FAQ
- • Select your workspace in the Azure Portal
- • Go to General Settings
- • Modify the data retention duration to suit your needs
Table of Contents
ToggleContact Us