31天后如何在Azure Log Analytics中保留数据? [英] How to retain data in Azure Log Analytics beyond the 31 days?
问题描述
我正在研究用于保留Azure Log Analytics支持的31天之后的数据的选项。我尝试阅读文档,但还无法弄清楚。应该如何设计?是否期望使用其他一些方法从数据源中将日志归档到该数据库之外的冷Azure存储帐户中,或者是否有方法将解析后的日志数据从Azure Analytics日志路由到Azure存储帐户? p>
I am looking into options for retaining data beyond the 31 days that Azure Log Analytics supports. I tried reading the documentation, but I haven’t been able to figure it out yet. How should this be architected? Is the expectation that the logs should be archived to a cold Azure Storage account outside of this using some other method from the data source, or is there a way to route the parsed log data from Azure Analytics Logs to an Azure Storage account?
推荐答案
如果您不使用免费套餐,则可以更改Log Analytics 数据保留
设置最多730天。阅读更多详细信息
If you are not using a free tier, you could change Log Analytics data retention
settings up to 730 days. Read more details here.
通常,您可以使用诊断日志执行以下操作。
Generally, you could do the following things with diagnostic logs.
- 将它们保存到存储帐户以进行审核或手动检查。您
可以使用资源诊断
设置指定保留时间(天)。
- 将它们流式传输到事件中心,以供第三方
服务或自定义分析解决方案(例如Power BI)提取。
- 使用Azure Monitor对其进行分析,无需先将数据写入存储即可将数据立即写入Azure
Monitor。
根据您的使用情况,您可以选择将这些日志存储在存储帐户中。这里是示例Powershell脚本,展示了如何将Storage Analytics日志数据转换为JSON格式并将JSON数据发布到Log Analytics工作区。
Depend on your usage, you could select to store these logs in a storage account. Here is a sample Powershell script to show how to convert Storage Analytics log data to JSON format and post the JSON data to a Log Analytics workspace.
这篇关于31天后如何在Azure Log Analytics中保留数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!