cloud-scanner
Collect aws cloud usage data, so that it can be combined with impact data of Boavizta API.
At the moment it just returns impacts of your aws instances. It does not use metrics of instance usage to calculate the impacts, but rather returns the default impact data provided by API for each instance types.
Getting started
List AWS instances of the account
Using default account region.
export AWS_PROFILE='<YOUR_PROFILE_NAME>'
cargo run -- --text
List impacts of AWS instances of the account
Using default account region.
export AWS_PROFILE='<YOUR_PROFILE_NAME>'
cargo run
Get impact of your instances for a given period
- pass period parameter (start date / end date)
- define a sampling rate for cloudwatch metrics retrieval?
Usage
Cli options
cargo run -- --help
cloud-scanner-cli 0.0.1
AWS account scanner to list instances.
USAGE:
cloud-scanner-cli [FLAGS] [OPTIONS]
FLAGS:
-h, --help Prints help information
-l, --list-metrics Display available metrics
-t, --text Display results as text (instead of json)
-V, --version Prints version information
OPTIONS:
-f, --filter-tags <filter-tags>... Filter instances on tags (like tag-key-1=val_1 tag-key_2=val2)
Passing AWS credentials
Easiest way is use an environment variable to use a specific aws profile.
export AWS_PROFILE='<YOUR_PROFILE_NAME>'
Filtering resources
Not yet implemented
Output format
Cloud scanner returns json array of instances metadata (instanceid, tags and type and default usage impacts) on stdout.
Will soon return
- an array of instances with impacts tuned with usage/workload (json)
Generate / update Boavizta API sdk
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i http://api.boavizta.org/openapi.json -g rust -o /local/boavizta-api-sdk --package-name boavizta_api_sdk