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
已提问 5 个月前102 查看次数
1 回答
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
已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则