amazon-web-services - CloudWatch Insights 过滤到仅包含查询字符串的主页请求
问题描述
我们的日志中有一个“url”字段,我希望能够过滤到仅请求访问主页。这将是对/
和 for 的请求/?*
,即使用任何查询字符串。
只是获取主页请求,| filter url = "/"
但是如何包含那些也有查询字符串的请求呢?
解决方案
您可以使用正则表达式:https ://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html
像这样的东西应该工作:
filter url = "/" or url like /^\/\?.*/
推荐阅读
- postgresql - 在 PostgreSQL 上重新启用表日志记录
- python - Python:使用 bs4 提取某些值
- performance - 为什么要将计算机性能与 1 除以执行时间联系起来?
- android - Android 应用程序在未捕获的异常处理程序 (Xamarin) 中崩溃
- visual-studio-code - 如何在 Visual Studio Code 中更改当前选定行的样式
- javascript - 如何在php中选择过滤数据表中的所有复选框?
- django - 以模板形式显示 list[0] list[1] 默认值
- google-apps-script - 无论如何要加快谷歌表格脚本中的以下代码?
- tcl - 我们可以在 tcl 中声明一个类似于 Java 中的实例变量的变量,即一旦声明就可以在类中的任何地方访问吗?
- c - C编程中系统时间和用户输入时间的时间差