Skip to content

hoangtrung99/kasan-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

  1. Setup aws credentials profile in ~/.aws/credentials, e.g.
[kasan-prod]
aws_access_key_id = AKIA...
aws_secret_access_key = ...
  1. Export the profile name as an environment variable
export AWS_PROFILE=kasan-prod
  1. Install jq and aws-cli if you haven't already.

Usage:

- make # make report from 21th past month to 21th this month
- make report-today # make report from 21th past month to today
- make report START_TIME={start_time} END_TIME={end_time} # make report from {start_time} to {end_time}

Add a new report

  1. Make sure new_report.sh is executable
chmod +x new_report.sh
  1. run the script, you can use the arguments or change file var in config/{report-name}/var after running the script
Usage: ./new_report.sh --name <report-name> [--namespace <namespace>] [--metric-name <metric-name>] [--statistic <statistic>] [--period <period>]
  --name         The unique name for the report (required)
  --namespace    AWS namespace (optional)
  --metric-name  AWS metric name (optional)
  --statistic    The statistic to retrieve (optional, default 'Sum')
  --period       The period in seconds (optional, default '86400')

About

make aws report metric, csv, image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published