Code Monkey home page Code Monkey logo

terraform-aws-cloudwatch-log-group's Introduction

cloudwatch-log-group

Terraform actions status

Provides a CloudWatch Log Group resource. By default a subscription filter is provided that forwards all of the log group's data to the cloudwatch-to-splunk lambda function. If the subscription filter is enabled (the default), provide the three SSM parameter store variables required by the lambda function. Values for these variables will normally be set in the AWS console. If disable_subscription_filter is set, these variables are not provided.

Argument Reference

The following arguments are supported:

  • name - (Required) Log group name.

  • disable_subscription_filter - (Optional) Disable default subscription filter (Default false).

  • function_name - (Optional) Name of the lambda function to be invoked by the filter (Default cloudwatch-to-splunk).

  • filter_pattern - (Optional) A valid CloudWatch filter pattern for subscribing to a filtered stream of log events (default is . to match all messages)"

  • retention - (Optional) Log retention period in days (Default 30).

  • tags - (Optional) A map of tags for the resource.

Attributes Reference

The following attributes are exported:

  • arn - The Amazon Resource Name (ARN) specifying the log group.

  • lambda_function_arn - The Amazon Resource Name (ARN) identifying the Lambda function where log data optinally is forwarded to.

terraform-aws-cloudwatch-log-group's People

Contributors

ddriddle avatar jonroma avatar yoonlees avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-aws-cloudwatch-log-group's Issues

Change default for disable_subscription_filter?

The disable_subscription_filter currently defaults to false, which automatically subscribes the log group to the cloudwatch-to-splunk lambda function. With this value false, three SSM variables are added to manage the Splunk HEC token, endpoint URI, and sourcetype.

Because SSM doesn't support empty parameters, the bogus value *** NO VALUE SET *** is pre-populated when Terraform creates the cloudwatch-to-splunk SSM. @kwessel suggests that the default for disable_subscription_filter be changed to true so that the lambda function doesn't attempt to handle logging traffic from a CloudWatch log group lacking meaningful data used to authenticate to Splunk. This creates log traffic in the lambda's own log, which doesn't bother me. However, the unsuccessful attempt to run the Splunk code produces an error that is considered a failure of the lambda function. When we start issuing alarms based on this lambda function's failure rate, this will result in false positives.

The ideal solution is for the lambda function to ignore the pre-populated bogus value and not generate an error.

My opinion is that logging is an important enough function that the infrastructure designer should have to make an explicit choice on whether he/she wants Splunk logging, alternate external logging, or no external logging other than CloudWatch itself.

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.