-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.yaml
109 lines (89 loc) · 5.94 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: terraform-aws-rds-cloudwatch-sns-alarms
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-rds-cloudwatch-sns-alarms
# Badges to display
badges:
- name: "Build Status"
image: "https://travis-ci.org/cloudposse/terraform-aws-rds-cloudwatch-sns-alarms.svg?branch=master"
url: "https://travis-ci.org/cloudposse/terraform-aws-rds-cloudwatch-sns-alarms"
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-rds-cloudwatch-sns-alarms.svg"
url: "https://github.com/cloudposse/terraform-aws-rds-cloudwatch-sns-alarms/releases"
- name: "Slack Community"
image: "https://slack.cloudposse.com/badge.svg"
url: "https://slack.cloudposse.com"
# Short description of this project
description: |-
Terraform module that configures important RDS alerts using CloudWatch and sends them to an SNS topic.
Create a set of sane RDS CloudWatch alerts for monitoring the health of an RDS instance.
usage: |-
| area | metric | comparison operator | threshold | rationale |
|---------|------------------|----------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Storage | BurstBalance | `<` | 20 % | 20 % of credits allow you to burst for a few minutes which gives you enough time to a) fix the inefficiency, b) add capacity or c) switch to io1 storage type. |
| Storage | DiskQueueDepth | `>` | 64 | This number is calculated from our experience with RDS workloads. |
| Storage | FreeStorageSpace | `<` | 2 GB | 2 GB usually provides enough time to a) fix why so much space is consumed or b) add capacity. You can also modify this value to 10% of your database capacity. |
| CPU | CPUUtilization | `>` | 80 % | Queuing theory tells us the latency increases exponentially with utilization. In practice, we see higher latency when utilization exceeds 80% and unacceptable high latency with utilization above 90% |
| CPU | CPUCreditBalance | `<` | 20 | One credit equals 1 minute of 100% usage of a vCPU. 20 credits should give you enough time to a) fix the inefficiency, b) add capacity or c) don't use t2 type. |
| Memory | FreeableMemory | `<` | 64 MB | This number is calculated from our experience with RDS workloads. |
| Memory | SwapUsage | `>` | 256 MB | Sometimes you can not entirely avoid swapping. But once the database accesses paged memory, it will slow down. |
examples: |-
See the [`examples/`](examples/) directory for working examples.
```hcl
resource "aws_db_instance" "default" {
allocated_storage = 10
storage_type = "gp2"
engine = "mysql"
engine_version = "5.7"
instance_class = "db.t2.micro"
identifier_prefix = "rds-server-example"
name = "mydb"
username = "foo"
password = "foobarbaz"
parameter_group_name = "default.mysql5.7"
apply_immediately = "true"
skip_final_snapshot = "true"
}
module "rds_alarms" {
source = "git::https://github.com/cloudposse/terraform-aws-rds-cloudwatch-sns-alarms.git?ref=tags/0.1.5"
db_instance_id = "${aws_db_instance.default.id}"
}
```
# Other files to include in this README from the project folder
include:
- "docs/terraform.md"
- "docs/targets.md"
related:
- name: "terraform-aws-ec2-cloudwatch-sns-alarms"
description: "Terraform module that configures CloudWatch SNS alerts for EC2 instances"
url: "https://github.com/cloudposse/terraform-aws-ec2-cloudwatch-sns-alarms"
- name: "terraform-aws-ecs-cloudwatch-sns-alarms"
description: "Terraform module for creating ECS service level alerts that go to an SNS endpoint"
url: "https://github.com/cloudposse/terraform-aws-ecs-cloudwatch-sns-alarms"
- name: "terraform-aws-efs-cloudwatch-sns-alarms"
description: "Terraform module that configures CloudWatch SNS alerts for EFS"
url: "https://github.com/cloudposse/terraform-aws-efs-cloudwatch-sns-alarms"
- name: "terraform-aws-elasticache-cloudwatch-sns-alarms"
description: "Terraform module that configures CloudWatch SNS alerts for ElastiCache"
url: "https://github.com/cloudposse/terraform-aws-elasticache-cloudwatch-sns-alarms"
- name: "terraform-aws-lambda-cloudwatch-sns-alarms"
description: "Terraform module for creating a set of Lambda alarms and outputting to an endpoint"
url: "https://github.com/cloudposse/terraform-aws-lambda-cloudwatch-sns-alarms"
- name: "terraform-aws-sqs-cloudwatch-sns-alarms"
description: "Terraform module for creating alarms for SQS and notifying endpoints"
url: "https://github.com/cloudposse/terraform-aws-sqs-cloudwatch-sns-alarms"
# Contributors to this project
contributors:
- name: "Jamie Nelson"
github: "Jamie-BitFlight"
- name: "Erik Osterman"
github: "osterman"
- name: "Daniel Patriche"
github: "rebelthor"