Metric Filter configuration producing unexpected results
See original GitHub issueIssue Description
This is a Bug Report
Description
I am trying to configure a metric filter alarm with a given filter pattern for the function under my service,
custom:
alerts:
topics:
alarm:
topic: arn:aws:sns:eu-west-1:704255512929:CloudWatch-ErrorLogs
function:
- name: AnAlarm
metric: AnError
treatMissingData: notBreaching
threshold: 0
statistic: Sum
period: 60
evaluationPeriods: 1
comparisonOperator: GreaterThanThreshold
pattern: '[ERROR]'
I was expecting this to create a single metric filter (ERROR) linked a single alarm that is then linked to an SNS Topic (CloudWatch-ErrorLogs), however what is actually happening is 2 metric filters are being created, one with a suffix ALERT and another with a suffix OK. Both of these are then linked to the same metric and the same alert.
From reviewing the code it appears there is code specific to create 2 metric filters, one for the Alert and one for the OK and I wondered why this was the case? Would it be possible to support a way of configuring it to exclude the OK metric filters?
Additional Data
- Serverless Framework Version: 1.26.0:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:11
Top Results From Across the Web
PutMetricFilter - Amazon CloudWatch Logs
With metric filters, you can configure rules to extract metric data from log events ... To prevent unexpected high charges, do not specify...
Read more >Configure Metric Filtering - TechDocs - Broadcom Inc.
You can filter metrics while managing dashboards or configuring event rules for thresholds. Consider dashboard and threshold requirements before ...
Read more >describe-metric-filters — AWS CLI 2.9.9 Command Reference
Filters results to include only those with the specified metric name. If you include this parameter in your request, you must also include...
Read more >Filter and pattern syntax - Amazon CloudWatch Logs
You can create metric filters to match terms in your log events and convert log data into metrics. When a metric filter matches...
Read more >CloudWatch log metric filter and alarm for AWS Organizations ...
This monitoring technique helps you to ensure that any unexpected changes performed within your AWS Organizations can be investigated and any unwanted ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It still seems to be problem. Have we done the fix?
I should do that - I’ve just been lazy (and I’ve never made a pull request before so I have to figure out how to do that 😃. Let me see if I can get that together in the next week or so…