Why I do hit Metric Resource Limit Exceeded

0

Hi There

I have a log group with 8 Metric Filters configured. When I try to add the 9th Metric Filter I get the following error "Metric Filter could not be created". The Cloudwatch Logs quota say that I can go up to 100 Metric Filters per Log Group. I am not sure what am I missing, appreicate any insights?

Ahmad M
asked 5 months ago86 views
1 Answer
0

Hello,

Some possible reason(s) of failure in creation of metric filter can be:

If the observable error is:
Metric filter "<NAME>" could not be created.
Resource limit exceeded.

I would like to inform you that, the limit for number of Metric Filters per log group is 100 [1]. However, out of these 100 Metric Filters only 5 can contain regular expression in them [1][2].

Please Note: Metric filter pattern specified as % <PATTERN> % are considered as regular expression [3], Example: %[Tt]esting [Pp]attern%.

If the observable error is:
Metric filter "<NAME>" could not be created.
Invalid character(s) in term <INFO>

In this case the error is observable as the Metric Filter pattern syntax was incorrect.

For detailed understanding of metric filter pattern syntax, please consider referring the documentation:

[+] Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail - https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html

References

[1] CloudWatch Logs quotas - https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html

[2] Amazon CloudWatch Logs announces regular expression filter pattern syntax support - https://aws.amazon.com/about-aws/whats-new/2023/09/amazon-cloudwatch-logs-regular-expression-filter-pattern-syntax-support/

[3] Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail - Supported regular expressions (regex) syntax - https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html#regex-expressions

AWS
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions