Terraform module designed to forward AWS Cloudwatch Logs to LogDNA. The module subscribes to a Cloudwatch Logs Group. A Lambda function then forwards the logs to LogDNA.
It's 100% Open Source and licensed under the MIT license.
This project is available on the Terraform Registry
Include this module in your existing terraform code:
module "logdna" {
source = "kabisa/logdna/aws"
#Use the latest version from the Terraform Registry
version = "0.0.0"
filter_pattern = "[host, ident, authuser, date, request, status, bytes]"
environment = "acceptance"
log_group_name = "name-of-cloudwatch-log-group"
log_subscription_filter_name = "name-of-cloudwatch-subscription-filter"
lambda_execute_role_name = "lambda-execute-stream-role"
log_dna_key = "${var.log_dna_key}"
log_group_arn = "arn-of-log-group"
region = "eu-west-1"
log_subscription_filter = "logdna-cloudwatch"
application_name = "testapp"
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
filter_pattern | A valid CloudWatch Logs filter pattern for subscribing to a filtered stream of log events. | string | [host, ident, authuser, date, request, status, bytes] |
no |
environment | The name of the current environment. (e.g acceptence, production) | string | - |
yes |
log_group_name | The name of the log group to associate the subscription filter with. | string | - |
yes |
lambda_execute_role_name | The name of the execution IAM role. | string | - |
yes |
log_dna_key | LogDNA Ingestion Key. | string | - |
yes |
log_group_arn | The ARN of the Cloudwatch Log Group for which to forward logs for. | string | - |
yes |
region | The region in which the Cloudwatch Log Group is provisioned. | string | - |
yes |
log_subscription_filter | The name for the Cloudwatch Log subscription filter. | string | - |
yes |
None
Like this project? Please give it a ★ on our GitHub! (it helps us a lot)
Are you using this project or any of our other projects? Consider sharing this project:
Got a question?
File a GitHub issue, or send us an email.
At Kabisa we believe in the power of AWS in combination with Infrastructure as Code. Our DevOps Engineers are AWS certified and as a result of our expertise and experience we are official AWS partner Standard.
Struggling with Terraform our just need an extra hand? Contact us at:
Please use the issue tracker to report any bugs or file feature requests.
If you are interested in being a contributor and want to get involved in developing this project or help out with our other projects, we would love to hear from you! Shoot us an email.
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull Request so that we can review your changes
NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!
Copyright © 2022 Kabisa B.V
See LICENSE for full details.
All other trademarks referenced herein are the property of their respective owners.
This project is maintained and funded by Kabisa B.V. Like it? Please let us know by leaving a comment!