https://github.com/trackit/cloudwatch-instance-count-metrics
Generates AWS CloudWatch metrics for on-demand and reserved EC2 instance counts.
https://github.com/trackit/cloudwatch-instance-count-metrics
aws-cloudformation aws-ec2 aws-lambda cloudwatch cloudwatch-metrics ec2 ec2-instance metrics metrics-gathering terraform
Last synced: 26 days ago
JSON representation
Generates AWS CloudWatch metrics for on-demand and reserved EC2 instance counts.
- Host: GitHub
- URL: https://github.com/trackit/cloudwatch-instance-count-metrics
- Owner: trackit
- License: mit
- Created: 2018-02-08T17:41:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-08T17:43:34.000Z (over 8 years ago)
- Last Synced: 2025-06-11T02:02:06.729Z (11 months ago)
- Topics: aws-cloudformation, aws-ec2, aws-lambda, cloudwatch, cloudwatch-metrics, ec2, ec2-instance, metrics, metrics-gathering, terraform
- Language: Python
- Size: 9.77 KB
- Stars: 2
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EC2 Instance count metrics producer
This repository contains the Terraform configuration and Python code for a
lambda function which periodically reads the list of all instances and that of
all reserved instances to produce useful CloudWatch metrics:
* On-demand instance count per type, AZ, tenancy and platform;
* Reserved instance count per type, AZ, tenancy and platform;
* Count of on-demand instances benefitting from instance reservations
(estimation) per type, AZ, tenancy and platform;
* Count of reserved instances match by no on-demand instances per type, AZ,
tenancy and platform;
## Deployment
### Requirements
In order to deploy this you need to have AWS credentials configured using any
of the standard ways supported by the AWS SDKs, and you need to have an up to
date version of Terraform installed.
### Process
1. Edit `provider.tf` to set the region you want the metrics to be generated in.
2. Run `terraform init`
3. Run `terraform apply`
4. Metrics should appear soon in CloudWatch under the “Trackit” namespace.