Why it matters
Interactive retention is often raised to meet a compliance period, even though queries, alerts and dashboards only look at the last few weeks. Long-term retention meets the same requirement at a lower price.How nOps finds it
nOps reads your pay-as-you-go Log Analytics billing. A workspace is flagged when it was billed for interactive data retention on at least 13 of the last 14 complete days. The saving is the retention cost over the last 7 days, scaled to a month, times the difference between the public list prices of long-term retention and interactive retention in the workspace’s region. It must be at least $5 a month. Workspaces whose retention is mostly covered by credits or commitments are left out.Before you start
Know how far back your queries, alert rules, workbooks and dashboards read each table. Permission to change table settings in the workspace.How to implement
- For each large table, check how many days of data your queries, alerts and workbooks actually use.
- In the Azure portal, open the workspace, go to Tables, select the table and choose Manage table.
- Set Interactive retention to what your queries need (for example, the free period) and keep Total retention at your required period. Or run
az monitor log-analytics workspace table update --resource-group MY_RG --workspace-name MY_WORKSPACE --name MYTABLE --retention-time 30 --total-retention-time 365. - If retention is set in Terraform, Bicep or ARM templates, update them too so a later deployment does not change it back.
Risks and considerations
- Data in long-term retention cannot be queried directly. You read it with a search job (billed per GB scanned) or a restore (billed per GB per day).
- Alerts or workbooks that look back further than the new interactive period stop seeing the older data.
- You can raise interactive retention again later. Data already moved to long-term retention becomes interactive again only for the period you set.
FAQs
Does this delete any data?
Does this delete any data?
No. Total retention stays the same. Only the part of it that can be queried directly gets shorter.