|
1 | 1 | # terraform_elasticache_slowlog_to_datadog |
2 | | -Deploy Elasticache Slowlog to Datadog lambda function to AWS account |
| 2 | + |
| 3 | +**Deploy Elasticache Slowlog to Datadog lambda function to AWS account** |
| 4 | + |
| 5 | +This terraform module deploys [elasticache-slowlog-to-datadog](https://github.com/scribd/elasticache-slowlog-to-datadog) |
| 6 | +to AWS to submit Elasticache slowlog entries. |
| 7 | + |
| 8 | +[](https://github.com/semantic-release/semantic-release) |
| 9 | + |
| 10 | +# Usage |
| 11 | + |
| 12 | +``` |
| 13 | +module slowlog_check { |
| 14 | + source = "git::https://github.com/scribd/terraform-elasticache-slowlog-to-datadog.git?ref=master" |
| 15 | + elasticache_endpoint = "master.replicationgroup.abcdef.use2.cache.amazonaws.com" |
| 16 | + elasticache_security_groups = ["sg-12345"] |
| 17 | + subnet_ids = [ "subnet-0123456789abcdef", "subnet-abcdef1234567890", "subnet-1234567890abcdef", ] |
| 18 | + vpc_id = "vpc-0123456789abcdef" |
| 19 | + datadog_api_key = "abc123" |
| 20 | + datadog_app_key = "abc123" |
| 21 | + namespace = "example" |
| 22 | + env = "dev" |
| 23 | + tags = {"foo" = "bar"} |
| 24 | +} |
| 25 | +``` |
| 26 | + |
| 27 | +## Parameters |
| 28 | + |
| 29 | +The following parameters need to be supplied to the terraform job |
| 30 | + |
| 31 | +Parameter | Type | Description | Required | Default |
| 32 | +----------------------------|--------------|------------------------------------------------------------------------------|----------|--------- |
| 33 | +elasticache_endpoint | string | AWS Elasticache endpoint to get slowqueries from | yes | - |
| 34 | +elasticache_security_groups | list(string) | AWS Elasticache Security groups to bind to | yes | [] |
| 35 | +subnet_ids | list(string) | Subnets to associate with VPC lambda job | yes | - |
| 36 | +vpc_id | string | VPC to associate with VPC lambda job | yes | - |
| 37 | +datadog_api_key | string | Datadog API key | yes | - |
| 38 | +datadog_app_key | string | Datadog App key | yes | - |
| 39 | +namespace | string | Namespace tag to pass to datadog | yes | - |
| 40 | +env | string | Namespace tag to pass to datadog | yes | - |
| 41 | +metric_name | string | Custom metric name to pass ot datadog | no | "elasticache.slowlog" |
| 42 | +ssm_path | string | Custom SSM path to provision Datadog access ID's in. Leading slash ommitted. | no | "slowlog_check" |
| 43 | +tags | object | Additional tags to create resources with and to send to datadog | no | {} |
| 44 | + |
| 45 | +# Requirements |
| 46 | + |
| 47 | +To use *terraform-elasticache-slowlog-to-datadog* you need: |
| 48 | + |
| 49 | +- An AWS account with an Elasticache instance running the `redis5.0` engine. |
| 50 | +- A Datadog account |
| 51 | + |
| 52 | +# Development |
| 53 | + |
| 54 | +Releases are cut using [semantic-release](https://github.com/semantic-release/semantic-release). |
| 55 | + |
| 56 | +Please write commit messages following [Angular commit guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) |
0 commit comments