New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS::Logs::MetricFilter does not accept dimensions #64
Comments
|
This is a duplicate of aws-cloudformation/cloudformation-coverage-roadmap#419 |
|
Any updates? |
|
Working on this feature request. Support should be available shortly. |
|
Deployment beginning shortly. I will update here once completed. |
|
@waifa Any updates on this? 🙏 |
|
@waifa can you advise on the status of this? |
|
The deployment from February failed unfortunately. We are currently working on a fix, thanks for your patience! |
|
@waifa Hey there! Curious if there are any updates on this? Thanks! |
|
We have been working on issues related to deployment and traffic migration. Stay tuned to update which I should be able to provide by End of July |
|
This seems to be live (at least defined) in the CloudFormation specification for us-east-1: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html |
I just checked in eu-central-1: It's not live as of now. However, it's possible to use the Unit property which is not yet covered in the CloudFormation documentation. |
|
The documentation description for the Dimensions property is a little weird, but I've managed to successfully use it in ap-northeast-1 |
|
@KirtiKunalShah You mentioned there might be an update around this time. Anything you can share with us on current progress? |
|
@waifa Can you help with a sample of how dimensions work? Looks like this is available in us-west-2 and i can consume it. Can you help with an example ? |
|
The dimension value needs to be a value matched in the filterPattern. Jyoti's problem was fixed by changing the value of the dimension in his template to "$.AZ". |
|
Announcement: Dimensions and units are available in almost all regions. There are a select few regions that still need some work to make this feature available(like ap-northeast-3)! I will close this issue once it is available in all regions. |
As of now, it is not available in eu-central-1: CREATE_FAILED - |
|
It used to work in eu-central-1 Now our stacks no longer deploy: 12:40:53 | CREATE_FAILED | AWS::Logs::MetricFilter | MetricFilter |
|
Sincere apologies from AWS for this inconsistency. A mistake on our end caused the feature to be rolled back in eu-central-1 for a week and a couple other regions for a short period of time. |
Can you support arbitrary values for dimension name? In my case the dimension name is not present in the log event and I need to specify it manually for the filter. |
|
AWS::Logs::MetricFilter now accepts dimensions! |
|
@waifa Do you know if it's on the roadmap to include a dimension value that is not in the filterPattern? For example, I want the Lambda function name to be a dimension but it's often not in the log and thus is not extracted by the filterPattern. |
I raised this issue internally and trying to get it prioritized, but it's not currently on any roadmap. |
|
Are you guys 100% sure that this is working in Example: This is working, by the way: |
Yes, it should be working in I believe your Metric Filter is returning an error because you are using a text-based filter pattern (as opposed to space-delimited or JSON). Text-based filter patterns do not support dimensions. |
I see, i have no idea why such a limitation exists in the first place but i'll try to get it working using your link. |
@gordonpn it would be great to include this feature on roadmap for the use cases it can support :) |
|
I should be able to hard code a dimension, rather than always pull it from a log line. Use cases:
This could be easily achieved by allowing non-selectors as dimension values (strings that don't start with $) |
@alancnet I agree with you and this is also something I raised internally, which is also pending prioritization. |
Raised this issue since this issue is not solved still. |
The following announcement makes dimensions available for metric filters.
https://aws.amazon.com/about-aws/whats-new/2021/05/amazon-cloudwatch-logs-announces-dimension-support-for-metric-filters/
However, it appears to be missing when specifying the resource through CloudFormation. Getting the following error on stack events console.
Encountered unsupported property Dimensions
The Python SDK documentation correctly shows this as available, but missing in CloudFormation docs for CloudWatchLogs.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/logs.html#CloudWatchLogs.Client.put_metric_filter
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html
The text was updated successfully, but these errors were encountered: