Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Filter on a subquery in Amazon Cloudwatch Insights

Are you able to run a filter with a subquery in Cloudwatch Insights? I would like to take the requestID and find all logs related to it. I can run the queries separately but was trying to do it one.

Something like this:

filter @requestId in (filter @message like /Id 26313/ fields @requestId sort @timestamp desc limit 1)
| fields @message
| sort @timestamp desc
like image 965
Matt Kenney Avatar asked May 22 '20 21:05

Matt Kenney


People also ask

How do I filter timestamp in CloudWatch insights?

Filtering on timestamp is done with the range selector on the top right in the Logs Insights Console or with the startTime and endTime parameters on the StartQuery API.

How do you query CloudWatch metrics?

You can query CloudWatch Metrics Insights data by choosing the metric query mode in the Metric query editor. CloudWatch Metrics Insights is a powerful high-performance SQL query engine that you can use to query your metrics at scale.


1 Answers

No. Subqueries are not currently possible.

like image 162
gangreen Avatar answered Sep 21 '22 02:09

gangreen