Search for up to two years of data with OMS Log Analytics
Summary: Modify the retention value to save data for up to two years in Log Analytics.
Update: You can now change the retention period by using the Azure portal. Instructions and more information are available at Change how long Log Analytics stores data.
Good morning everyone, Richard Rundle here, and today I want to talk about how you can choose to keep your data for up to two years in Log Analytics.
Our paid pricing plans include 30 days of data retention, but you can now increase that retention to be up to 730 days (two years)!
We’re still in the process of building the user interface (UI) and adding support for setting this through PowerShell, but we know many of you are eager to keep your data for longer. This post shows how to use Azure Resource Explorer to make the change.
Change data retention
You need to be on the Standalone or OMS pricing plan to be able to change your retention. If you are on the Free pricing plan, your retention is fixed at 7 days. If you have a workspace created prior to October 1, your retention is fixed at 30 days if you are on the Standard plan, or 365 days if you are on the Premium plan.
To move from the default of 30 days retention to a longer retention, use the following steps:
- Open https://resources.azure.com and login with the credentials you use to login to portal.azure.com
- T expand subscriptions, click the + (plus) symbol in the left pane.
- To expand the subscription click the + symbol.
- To expand resourceGroups, click the + symbol.
- Expand the resource group that contains your Log Analytics workspace. In the Azure portal, when you select your Log Analytics workspace, the properties page show you the name of the resource group.
- Expand Microsoft.OperationalInsights. If you don’t see Microsoft.OperationalInsights, there are no workspaces in this resource group. Refer to step 5 to find which resource group your workspace is in.
- Click the name of your workspace. If you don’t see your workspace, make sure that you selected the resource group. Refer to step 5 to find which resource group your workspace is in.
- To change to Read/Write mode, click Read/Write at the top of the page.
- To change to Edit mode, click the Edit button. The Get button will change its name to PUT, and the blue button will change to Cancel.
- To change the value for retentionInDays, select the text and typing a new value.
- Click the green PUT button to make the change.
- Verify that new retention value is shown.
Troubleshooting
There are two errors that you might see.
The value provided for retention is invalid
This error means that you’ve tried to change the retention on a Free, Standard, or Premium plan. You can only change the retention if the plan is Standalone or OMS. (The OMS tier will show as “pernode” in the following UI):
You can’t do this operation because you are in ‘Read Only’ mode.
This will occur if you skip Step 8.
If you are creating a new workspace by using Azure Resource Manager templates, see Manage Log Analytics using Azure Resource Manager templates to learn how to specify the length of time that you’d like to retain data.
That is all I have for you today. I would like to hear any feedback you have.
Please feel free to send me an e-mail at Richard.Rundle@microsoft.com with questions, comments, and suggestions.
Richard Rundle
Microsoft Operations Management Team
Comments
- Anonymous
November 16, 2016
The comment has been removed - Anonymous
December 19, 2016
Hi there colleagues, how is the whole thing, and what you want to sayon the topic of this paragraph, in my view its genuinely amazing in favor of me. - Anonymous
December 20, 2016
The comment has been removed - Anonymous
January 12, 2017
My OMS workspace "retentionInDays" is "0".Can I change "retentionInDays" from "0" to "365" ?I have two OMS workspaces.1. Data Plan = OMS2. Data Plan = FREE - Anonymous
January 23, 2017
So, what impact does this have on Log Analytics/OMS pricing? What additional charges, if any, will be assessed for extending the data retention period? - Anonymous
March 06, 2017
Awesome article!Just to check, if we extend the data retention, how will be the pricing calculation? As from the Data Plan available in OMS portal, it is only available for 1-month retention.