'Is it possible to reduce AzureDiagnostics logs (Log Analytics)?
Looking for a way to reduce AzureDiagnostics table in Azure Log Analytics.
Is it possible to reduce log collecting time? For example, get CPU or Disk stats every 1h instead 5m for all or custom resources?
Or, maybe, there is a way to clean up logs with less than default period 31 days?
Solution 1:[1]
- As per the updated Microsoft Document it is still not possible to reduce the default time for cleanup logs
You can set the workspace default retention policy in the Azure portal to 30, 31, 60, 90, 120, 180, 270, 365, 550, and 730 days. To set a different policy, use the Resource Manager configuration method described below. If you're on the free tier, you need to upgrade to the paid tier to change the data retention period.
- If you are looking for Avg of CPU stats you can use the below query which will give you the time period of 5 minutes.
Perf
| where ObjectName == "Processor Information" and CounterName == "% Processor Time" and InstanceName == "_Total"
| summarize AggregatedValue = avg(CounterValue) by Computer, bin(TimeGenerated, 5m)
- You can also raise a feature request over here which may even help the other people with same issues.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | SaiSakethGuduru-MT |
