I have a number of EC2 instances, each running a separate instance of my application. All log files are being streamed into CloudWatch, using the hostname of each EC2 instance as the log stream name, so I have multiple log streams for each log group.
I want to create a custom metric for each of my EC2 instances using data from the CloudWatch logs. I've set up a metric filter, but this aggregates the data across all the log streams in my log group. I want to be able to see this metric for each individual EC2 instance (i.e. separate by log stream). Is this possible? Or if not, how would I achieve this? (The only method I can think of would be to use a different log group for each instance, which isn't ideal).