有没有办法在小部件中只过滤不包含特定日志消息的@LogStream?
我尝试使用带有一些过滤器的日志表,如:https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html和:https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html#CWL_QuerySyntax-regex中所示
据我所知,过滤器适用于邮件,但我需要一种在日志流级别进行过滤和选择的方法。
尝试了下面这样的方法:
fields @logStream,strcontains(@logStream,"INFO - My message")找到
|过滤found=0
| display @logStream
|限制20
但是过滤器不工作,它正在显示所有的消息。
谢谢!
发布于 2021-09-29 12:28:32
在我看来,您查询中的strcontains(@logStream, "[INFO] - My message") as found部分不正确。我想你的本意是:strcontains(@message, "[INFO] - My message") as found
https://stackoverflow.com/questions/67000937
复制相似问题