How do I filter AWS Cloud Watch Logs on a hash on the main page?

耗尽温柔 提交于 2020-01-16 09:05:26

问题


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.

Here is the message

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


回答1:


You can do it with Logs Insights.

  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"

Description of fields:

  • @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.


来源:https://stackoverflow.com/questions/57617203/how-do-i-filter-aws-cloud-watch-logs-on-a-hash-on-the-main-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!