Skip to content
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

Automatically add CloudWatch Logs filters and alarms #75

Open
jazzl0ver opened this issue Sep 4, 2018 · 0 comments
Open

Automatically add CloudWatch Logs filters and alarms #75

jazzl0ver opened this issue Sep 4, 2018 · 0 comments

Comments

@jazzl0ver
Copy link
Collaborator

Here is the feature request: when a service is being created, automatically add warnings and errors filters to the cloudwatch logs and setup alarms. This can be enabled by a special cli key, like -enable-service-alarms "mySNSTopic" (or expect an email address instead and create an SNS topic for that).
The AWS CLI command lines might be:

aws logs put-metric-filter --log-group-name firecamp-qa-cass-qa-bd751a2269a44a2e52898bc0dd5cb2ac --filter-name "cass-qa" --filter-pattern "?WARN ?ERROR" --metric-transformations 'metricName=cass-qa,metricValue=1,metricNamespace="firecamp-qa LogMetrics"'

aws cloudwatch put-metric-alarm --alarm-name "cass-qa LogMetrics" --actions-enabled --alarm-actions "arn:aws:sns:us-east-1:00000000:mySNSTopic" --metric-name cass-qa --namespace "firecamp-qa LogMetrics" --period 300 --evaluation-periods 1 --datapoints-to-alarm 1 --threshold 0 --comparison-operator GreaterThanThreshold --treat-missing-data notBreaching --statistic Sum --output json

I believe this is very useful thing to have. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant