我正在阅读 AWS CloudWatch Logs 文档 here 。他们说
Archive log data – You can use CloudWatch Logs to store your log data in highly durable storage. The CloudWatch Logs agent makes it easy to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.
在 pricing page 中,他们有
Store (Archival) $0.03 per GB
在 Pricing Calculator 中,他们提到
Log Storage/Archival (Standard and Vended Logs) Log volume archived is estimated to be 15% of Log volume ingested (due to compression). Storage/Archival costs are estimated assuming customer choses a retention period of one (1) month. Default retention setting is ‘never expire’.
问题
我正在尝试了解此存档功能的行为,以决定是否需要将日志数据移动到 S3。但我找不到任何进一步的细节。我尝试探索 CloudWatch Logs 页面中的每个按钮和链接,但找不到归档数据的方法,我只能将其删除或编辑其保留规则。
那么它是如何工作的呢?定价计算器中的备注称估计为摄取量的 15%,这是否意味着它始终自动归档 15% 的日志?为什么他们必须在计算中假设保留期设置为 1 个月,否则存档功能的行为是否会有所不同?
最佳答案
存档日志数据功能是指将日志数据存储在 CloudWatch Logs 中。除了“存档”之外,您不需要执行任何其他操作。这是您可以在控制台上看到的常规存储。
仅考虑存储定价,将日志存储在 S3 中更便宜。该价格因地区而异,但 S3 标准的平均价格约为每 GB 0.025 美元,而 CloudWatch Logs Storage 的平均价格为每 GB 0.03 美元。如果将对象移动到其他存储类,它会变得更便宜。
关于:
Log volume archived is estimated to be 15% of Log volume ingested (due to compression)
它指的是,如果在 CloudWatch Logs 上摄取 100GB 的数据,由于存储此日志的特殊压缩格式,它在存储上反射(reflect)为仅 15GB (15%)。
关于amazon-web-services - AWS CloudWatch Logs Archive(不是 S3),如何使用它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70684680/