0

I have a custom dashboard to track metrics like count of 2xx, 3xx, 4xx, 5xx status codes. What I want is to send a slack notification when the count of 5xx > N for a period of M mins. How do I achieve this?

I looked online and I understand bits and pieces of the steps but not the complete flow. I see the approach where we don't use lambda, and where we do. I am not able to put the information together in one flow.

1 Answer 1

0

You need a CloudWatch Alarm configured for your metrics with alarm and ok actions, and then use either Lambda Functions or AWS Chatbot to forward the alarm events to your slack channel.

AWS has a documentation how to configure Alarm actions with Lambda Functions .

See how to set up AWS Chatbot with Slack and the documentation on CloudWatch alarms . For this case you need to

  1. Create an SNS topic for the alarm events.
  2. Configure the Alarm actions to send notifications to the SNS topic.
  3. Subscribe the Chatbot to the SNS topic.

Site note: Ad point 3, you can also subscribe a custom lambda function to that topic and achieve the same.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.