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 
preguntada hace 2 años984 visualizaciones
1 Respuesta
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
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas