Skip to content

AWS CloudWatch Log Insights Get Count of Unique Logs

Jason Lewis edited this page Mar 28, 2024 · 1 revision

Up

You can use the "| dedup " filter.

For example, to get the unique message_ids in a list of logs with NullReferenceException in the @message field:

fields message_id, @message 
| filter @message LIKE /NullReferenceException/ 
| sort @timestamp asc 
| dedup message_id
Clone this wiki locally