Code Monkey home page Code Monkey logo

Comments (4)

nozaq avatar nozaq commented on June 12, 2024

@JoostSaanen
Each alarm has a corresponding metric filter pattern associated, this pattern for S3BucketPolicyChanges for example.
Relevant CloudTrail logs can be retrieved by querying the above filter pattern to the CloudWatch Log Group. There are two ways to get this done from AWS Mamagement Console.

  1. Open CloudWatch Metrics then use "View logs" to apply the corresponding filter pattern to CloudWatch Logs. To get from metrics to logs section in the AWS doc describes in more detail.
  2. Open CloudWatch Log Group then directly type the filter pattern. See here.

Hope it would help, please let me know if you have other questions! :)

from terraform-aws-secure-baseline.

JoostSaanen avatar JoostSaanen commented on June 12, 2024

@nozaq Thanks for your time for answering my question!

I was thinking of a way to integrate the relevant Cloudtrail logs into the message of the post to the topic. I have an integration with SNS and Slack so I am able to see all alarms in Slack. How it works now, it's a bit of a hassle to quickly find the cause of an cloudwatch alarm. Would be cool if the cloudtrail info is already included in the Slack message. Any thoughts on that?

from terraform-aws-secure-baseline.

nozaq avatar nozaq commented on June 12, 2024

@JoostSaanen
Ah, now I got your point! I agree it would be beneficial if we could include actual log records in alarm messages 👍

CloudWatch Alarms itself does not send such information when it publishes a message to the SNS topic, so we need some intermediate lambda function to collect log records before sending messages.
It seems that this repo is very much relevant to this idea.

It is possible to implement the above function in this module though, some people may not want to expose actual log contents in alarm messages.
Given that, I'm wondering if this could be provided as a separated terraform module... 🤔

from terraform-aws-secure-baseline.

github-actions avatar github-actions commented on June 12, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

from terraform-aws-secure-baseline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.