A resource cloud scanner that analyzes and reports about wasteful and unused resources to cut unwanted expenses. The tool is based on yaml definitions (no code), by default configuration OR given yaml file and the report output will be saved in a given storage.
Currently it is implemented for AWS resources (RDS, EC2 instances, DynamoDB, ElasticCache, documentDB, ELB and etc) and can be easily extended.
+-------------------------------------------------------------------------------------------------+
| ID | REGION | INSTANCE TYPE | MULTI AZ | ENGINE | PRICE PER HOUR | PRICE PER MONTH |
+-------------------------------------------------------------------------------------------------+
| arn:aws:rds: | us-east-1 | db.m3.medium | true | mysql | 0.18 | 129.6 |
| arn:aws:rds: | us-east-1 | db.t2.medium | false | mysql | 0.068 | 48.96 |
+-------------------------------------------------------------------------------------------------+
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
All the logic is contained inside config.yaml.
- Setup your Cloud provider (currently AWS only) credentials and accounts you want to analyze.
providers:
aws:
- name: <ACCOUNT_NAME>
access_key: <ACCESS_KEY>
secret_key: <SECRET_KEY>
regions:
- <REGION>
- Let it run!
Optional: There are defaults but, You can specify your own resources to analyze and change the metrics thresholds.
If you want to test RDS resources that had zero connections in the last week:
rds:
- description: Database connection count
metrics:
- name: DatabaseConnections
statistic: Sum
period: 24h
start_time: 168h # 24(h) * 7(d) = 168h
constraint:
operator: "=="
value: 0
- AWS access key and secret key (with readonly access)
- Optional: Docker
- Build from source
$ Git clone [email protected]:kaplanelad/finala.git
$ make build
To run:
$ ./finala aws -c ${PWD}/config.yaml
For config example
- Download the binary https://github.com/similarweb/finala/releases
By default all the data will save in sqlite in local folder
--clear-storage Clear storage data (default true)
-c, --config string config file path
-h, --help help for finala
--storage-connection-string string Storage connection string. Default will be DB.db (default "DB.db")
--storage-driver string Storage driver. (Options: mysql,postgres,sqlite3,mssql) (default "sqlite3")
$ make test
$ make test-html
The full working example can be found in config.yaml.
- Find EC2 instances has less that 5% CPU usage.
ec2:
- description: EC2 CPU utilization
metrics:
- name: CPUUtilization
statistic: Maximum
period: 24h
start_time: 168h # 24h * 7d
constraint:
operator: "<"
value: 5
- Find RDS DB's that had zero connections in the last week. Maybe we can destroy the DB :)?
rds:
- description: Database connection count
metrics:
### Start: Cloudwatch metrics ###
- name: DatabaseConnections
statistic: Sum
period: 24h
start_time: 168h # 24h * 7d
### End: Cloudwatch metrics ###
constraint:
operator: "=="
value: 0
- Find ELB's that had zero traffic (requests) in the last week. Maybe we can destroy the ELB :)?
elb:
- description: Loadbalancer requests count
### Start: Cloudwatch metrics ###
metrics:
- name: RequestCount
statistic: Sum
period: 24h
start_time: 168h # 24h * 7d
### End: Cloudwatch metrics ###
constraint:
operator: "=="
value: 0
- Display the actual capacity usage VS the capacity requested (in percentage).
dynamodb:
- description: Provisioned read capacity units
### Start: Cloudwatch metrics ###
metrics:
- name: ConsumedReadCapacityUnits
statistic: Sum
- name: ProvisionedReadCapacityUnits
statistic: Sum
period: 24h
start_time: 168h # 24h * 7d
### End: Cloudwatch metrics ###
constraint:
formula: ConsumedReadCapacityUnits / ProvisionedReadCapacityUnits * 100 # specify any formula
operator: "<"
value: 10
All pull requests and issues are more then welcome!