Skip to content

Commit

Permalink
GitBook: [master] 15 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayalodha authored and gitbook-bot committed May 28, 2020
1 parent 4f44dcb commit 0a8e6eb
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 12 deletions.
6 changes: 4 additions & 2 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@

## Rules​

* [under\_utilized\_instance\_cpu\_rule](rules/under_utilized_instance_cpu_rule.md)
* [under\_utilized\_instance\_rule](rules/under_utilized_instance_rule.md)
* [auto\_scaling\_group\_optimization\_rule](rules/auto_scaling_group_optimization_rule.md)
* [under\_utilized\_database\_rule](rules/under_utilized_database_rule.md)
* [older\_generation\_instance\_rule](rules/older_ec2_generation_rule.md)
* [instance\_upgrade\_rule](rules/instance_upgrade_rule.md)
* [delete\_orphan\_instance\_storage\_rule](rules/delete_orphan_instance_storage_rule.md)
* [too\_many\_instance\_images\_rule](rules/too_many_instance_images_rule.md)
* [dev\_resources\_rule](rules/dev_resources_rule.md)
* [database\_upgrade\_rule](rules/database_upgrade_rule.md)
* [cache\_upgrade\_rule](rules/cache_upgrade_rule.md)
* [migration\_to\_docker\_rule](rules/migration_to_docker_rule.md)

10 changes: 5 additions & 5 deletions docs/config-params.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Config parameters are represent by JSON on home page when you launch [localhost:
"description": "Threshold AMI count above which too_many_instance_images_rule rule will raise a concern"
},
{
"key": "under_utilized_cpu_percentage",
"key": "under_utilized_cpu_percentage_instance",
"value": "30.0",
"description": "Average CPU utilization threshold for under-utilized machine"
"description": "Average CPU utilization threshold for under-utilized ec2 machine"
},
{
"key": "under_utilized_swap_space_percentage",
"value": "5.0",
"description": "NOT USED YET : Average swap memory percentage threshold for under-utilized database"
"key": "under_utilized_cpu_percentage_database",
"value": "10.0",
"description": "Average CPU utilization threshold for under-utilized RDS instances"
},
{
"key": "cloudwatch_config_duration",
Expand Down
18 changes: 18 additions & 0 deletions docs/rules/auto_scaling_group_optimization_rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# auto\_scaling\_group\_optimization\_rule

1. Check if MixedInstancePolicy is used or not
2. Check if LB attached to ALB is needed or not
3. Suggest migration to SpotFleet

## Permissions

* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [autoscaling:DescribeAutoScalingGroups](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/describe-auto-scaling-groups.html)

## Config Parameters used

* included\_tag
* excluded\_tag



16 changes: 16 additions & 0 deletions docs/rules/cache_upgrade_rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# cache\_upgrade\_rule

Check if ElastiCache instances are using latest generation of instances.

## Permissions

* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [elasticache:DescribeCacheClusters](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-clusters.html)

## Config Parameters used

* included\_tag
* excluded\_tag



8 changes: 7 additions & 1 deletion docs/rules/database_upgrade_rule.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# database\_upgrade\_rule

Check if RDS instances can be optimized.
1. Check if RDS instances are using latest generation of instances
2. Suggest migration of MySQL, Postgres and Mariadb to Amazon Aurora as it offers better price to performance ration

## Permissions

* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [rds:DescribeDBInstances](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-instances.html)

## Config Parameters used

* included\_tag
* excluded\_tag




Expand Down
5 changes: 5 additions & 0 deletions docs/rules/delete_orphan_instance_storage_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ This rule check if there are orphan EBS drives \(EBS drives which is not attache
* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [ec2:DescribeVolumes](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVolumes.html)

## Config Parameters used

* included\_tag
* excluded\_tag

5 changes: 5 additions & 0 deletions docs/rules/dev_resources_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ This rule analyze tags on resources to find development, QA, staging resources.
* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [ec2:DescribeInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)

## Config Parameters used

* included\_tag
* excluded\_tag

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# older\_generation\_instance\_rule
# instance\_upgrade\_rule

Newer generation of EC2 are cheaper and offers better price to performance ration, e.g **t3a** instances are around 15% cheaper than **t2** instances

Expand All @@ -11,6 +11,11 @@ Newer generation of EC2 are cheaper and offers better price to performance ratio
* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [ec2:DescribeInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)

## Config Parameters used

* included\_tag
* excluded\_tag




Expand Down
7 changes: 7 additions & 0 deletions docs/rules/migration_to_docker_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Check if Elastic Beanstalk is used or not, if yes then suggest migration to Dock
* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [ec2:DescribeInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)

## Config Parameters used

* included\_tag
* excluded\_tag






Expand Down
6 changes: 6 additions & 0 deletions docs/rules/too_many_instance_images_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ This rule checks if there are too many AMI present.
* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [ec2:DescribeImages](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html)

## Config Parameters used

* included\_tag
* excluded\_tag
* too\_many\_ami\_threshold

9 changes: 8 additions & 1 deletion docs/rules/under_utilized_database_rule.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# under\_utilized\_database\_rule

This rule checks if average CPU utilization of RDS is below 10%, analysis window is controlled by **cloudwatch\_config\_duration** config param \(default is 1 week\)
This rule checks if average CPU utilization of RDS is below 10%

## Permissions

* [ec2:DescribeRegions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html)
* [rds:DescribeDBInstances](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-instances.html)
* [cloudwatch:GetMetricStatistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html)

## Config Parameters used

* included\_tag
* excluded\_tag
* under\_utilized\_cpu\_percentage\_database
* cloudwatch\_config\_duration



Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# under\_utilized\_instance\_cpu\_rule
# under\_utilized\_instance\_rule

This rule checks if average CPU utilization is below threshold level \(default is 30% , refer **under\_utilized\_cpu\_percentage** config param\) , analysis window is controlled by **cloudwatch\_config\_duration** config param \(default is 1 week\)
This rule checks if average CPU utilization is below threshold level

Only \[a1, t3, t3a, t2, m6g, m5d, m5, m5a, m5ad, m5n, m5dn, m4, m1, t1, m3, c5, c5d, c5n, c4, c3, c1\] instance families are analyzed.

Expand All @@ -10,5 +10,12 @@ Only \[a1, t3, t3a, t2, m6g, m5d, m5, m5a, m5ad, m5n, m5dn, m4, m1, t1, m3, c5,
* [ec2:DescribeInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)
* [cloudwatch:GetMetricStatistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html)

## Config Parameters used

* included\_tag
* excluded\_tag
* under\_utilized\_cpu\_percentage\_instance
* cloudwatch\_config\_duration



2 changes: 2 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Below are the aggregated permissions IAM user need for execution all rules.
* [ec2:DescribeImages](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html)
* [cloudwatch:GetMetricStatistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html)
* [rds:DescribeDBInstances](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-instances.html)
* [elasticache:DescribeCacheClusters](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-clusters.html)
* [autoscaling:DescribeAutoScalingGroups](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/describe-auto-scaling-groups.html)

## Screenshot

Expand Down

0 comments on commit 0a8e6eb

Please sign in to comment.