Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update(readme) to solve the limitations #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 42 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,41 +97,58 @@ default thresholds. Where as for alarms created for
replica then an alarm will also be created for the replica lag. For every t2
instance, alarms are also created for remaining CPU credits.

Variables File `us-east-1.json`:
```json
{
"rds_alarms_common_action_list": [
"arn:aws:sns:us-east-1:9783248248:ALARMS"
],
"rds_alarms_period": 60,
"rds_alarms_evaluation_periods": 2,
"rds_alarms_region": "us-east-1",
"rds_alarms_warning_threshold": 70,
"rds_alarms_critical_threshold": 90,
"rds_alarms_warning_cpu_credits_threshold": 60,
"rds_alarms_critical_cpu_credits_threshold": 30,
"rds_alarms_db_instances": {
"my-rds-instance-identifier": {
"warning_db_connections_threshold": 100,
"critical_db_connections_threshold": 200,
"alarm_action_list": [
"arn:aws:sns:us-east-1:9783248248:MYALARM"
]
},
"my-replica-rds-instance-identifier": {
"warning_threshold": 80,
"warning_db_connections_threshold": 100,
"critical_db_connections_threshold": 200,
"alarm_action_list": [
"arn:aws:sns:us-east-1:9783248248:MYALARM"
],
"credit_warning_threshold": 20,
"credit_critical_threshold": 10,
"replica_lag_threshold": 1800
}
}
}
```

Ansible Playbook `rds-alarms.yaml`:
```yaml
- hosts: localhost
connection: local
vars:
rds_alarms_common_action_list:
- "arn:aws:sns:us-east-1:9783248248:ALARMS"
rds_alarms_period: 60
rds_alarms_evaluation_periods: 2
rds_alarms_region: us-east-1
rds_alarms_warning_threshold: 70
rds_alarms_critical_threshold: 90
rds_alarms_warning_cpu_credits_threshold: 60
rds_alarms_critical_cpu_credits_threshold: 30
rds_alarms_db_instances:
my-rds-instance-identifier: # this will use the defaults
warning_db_connections_threshold: 100
critical_db_connections_threshold: 200
alarm_action_list: ["arn:aws:sns:us-east-1:9783248248:MYALARM"]
my-replica-rds-instance-identifier:
warning_threshold: 80
warning_db_connections_threshold: 100
critical_db_connections_threshold: 200
alarm_action_list: ["arn:aws:sns:us-east-1:9783248248:MYALARM"]
credit_warning_threshold: 20
credit_critical_threshold: 10
replica_lag_threshold: 1800
roles:
- rds-alarms

```

To create alarms, run the following command,

## Limitations
```
ansible-playbook --extra-vars "@us-east-1.json" rds-alarms.yaml
```

You need to create multiple playbooks for different regions.
You can create separate json files for separate regions/configs/groups and use them with the above playbook

## License

Expand Down