CloudWatch-Insights: How to compare attributes on a query

0

I am trying to search for messages on AWS Insights with either matching or non matching attributes.

Specifically, Suppose I have an attribute "resp" and I want to search for messages which do not contain att.resp. Is something like that even feasible on AWS Insights?

Trying to do something similar to:

fields @timestamp, @message
| sort @timestamp desc
| filter @message not like att.resp 
질문됨 2년 전984회 조회
1개 답변
1

I think you are asking to find all events which don't have a value for the field att.resp? In which case, you can use the *filter *command with the *ispresent *function, for example

fields @timestamp, @message
| sort @timestamp desc
| filter NOT ispresent(att.resp 

If you want to see more on the Logs Insights syntax see https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html.

AWS
AWS-SA
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠