如何在主页上的哈希值上过滤AWS Cloud Watch日志? [英] How do I filter AWS Cloud Watch Logs on a hash on the main page?

查看:106
本文介绍了如何在主页上的哈希值上过滤AWS Cloud Watch日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从Cloud Watch日志主页面过滤器直接转到日志7cf2c033bfec48e8a74c40b08cdxx15f?这是一个过滤出日志组的文件.

How can I go directly to the log 7cf2c033bfec48e8a74c40b08cdxx15f from the main Cloud Watch logs page filter? This is the one that filters out log groups.

这是消息

Failed to create resource. See the details in CloudWatch Log Stream: 2019/08/22/[$LATEST]7cf2c033bfec48e8a74c40b08cdxx15f

现在我想使用散列来查找日志组和日志流

Now I want to use the hash to find the log group and the log stream

推荐答案

您可以使用Logs Insights做到这一点.

You can do it with Logs Insights.

  1. 在CloudWatch控制台上,导航到左侧面板上的见解"(位于日志下方).
  2. 点击顶部的选择日志组,然后将其全部选中.
  3. 为日志流选择正确的时间范围.您可以在日志流名称2019/08/22/[$LATEST]...
  4. 中看到它
  5. 使用此查询:fields @log, @logStream, @message | filter @logStream like "7cf2c033bfec48e8a74c40b08cdxx15f"
  1. On CloudWatch Console, navigate to Insights on the left panel (just under logs).
  2. Click the Select log group(s) on the top and select all of them.
  3. Select the correct time range for the log stream. You can see it in the log stream name, 2019/08/22/[$LATEST]...
  4. Use this query: fields @log, @logStream, @message | filter @logStream like "7cf2c033bfec48e8a74c40b08cdxx15f"

字段说明:

  • @log 将为您提供日志组
  • @logStream 将为您提供流名称,它应该是指向实际流的可单击链接.
  • @message 将给您日志行.
  • @log will give you the log group
  • @logStream will give you the stream name and it should be a clickable link to the actual stream.
  • @message will give you the log line.

这篇关于如何在主页上的哈希值上过滤AWS Cloud Watch日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆