如何尾部AWS应用程序负载平衡器日志?真的很难吗?如果是这样,为什么?
我是AWS的应用程序负载平衡器的新手,我感到来自Nginx世界有些丢失。确实没有办法拖延您的请求日志吗?如果是这样,是否有相对简单的人们用来观看日志的方式?
我阅读 docs 可以将日志发送到S3,从那里,我想您可以设置我们的Elasticsearch之类的Athena,但是男孩,这听起来像是全天或多天的项目!我不想将日志下载到我的笔记本电脑上,也不必将其拉开,只是为了监视事物。
我只想实时拖延一些日志。真的很难吗?
如果真的很难,我很想知道为什么。大多数时候,当AWS感到惊讶时,有一些原因与缩放或其他内容有关,但是我无法想象为什么尾随某些日志如此困难。
谢谢你!
I'm new to AWS's Application Load Balancers, and I'm feeling a bit lost coming from the nginx world. Is it true that there's no way to tail your request logs? If so, are there relatively simple ways people use to watch their logs?
I read the docs that you can send the logs to S3, and from there, I guess you can set up Athena our ElasticSearch or something, but boy, that sounds like an all-day or multiple-day project! I don't want to have to download logs to my laptop and unzip them either, just to monitor things.
I just want to tail some logs in realtime. Is it really this hard?
And if it really is this hard, I'd love to know why. Most times when AWS surprises me, there's some reason related to scaling or something, but I can't imagine why tailing some logs is so hard.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
真的很难。相比之下,API网关可以将其访问日志写入CloudWatch日志,因此您可以更接近实时。
原因是S3上的文件是原子编写的,因此您可以选择将任何一个批处理记录一起到一个文件中,或者每个记录编写一个文件。后者(1)将在高体积生产部署中添加极端的开销,并且(2)由于需要大量的读取,几乎无法分析。使用原始ELB,IIRC您只能在60分钟的间隔内写日志;稍后添加5分钟的间隔。
另外,实际尾登原木的唯一有意义是在开发中。
如果您有企业级的支持合同,则值得告诉您的TAM对您很重要。如果足够多的人这样做,那么迟早会实现它(可能是通过将日志写入CloudWatch)。也许他们已经实施了它,您的TAM可以使您进入功能预览。
It really is that hard. API Gateway, by comparison, can write its access logs to CloudWatch Logs, so you get closer to real-time.
The reason is that files on S3 are written atomically, so you have a choice of either batching records together into a single file, or writing one file per record. The latter would (1) add an extreme amount of overhead to a high-volume production deployment, and (2) be almost impossible to analyze due to the large number of reads that would be needed. With the original ELB, iirc you could only write logs on 60 minute intervals; the 5 minute intervals were added later.
Plus, the only time that it makes sense to actually tail logs is in development.
If you have an enterprise-level support contract, it would be worth telling your TAM that this is important to you. If enough people do so, then sooner or later they'll implement it (probably by writing logs to CloudWatch). Or maybe they've already implemented it, and your TAM can get you into the feature preview.