Resource statistics tool via AWS CloudWatch.
Add this line to your application's Gemfile:
gem 'kumome'
And then execute:
$ bundle
Or install it yourself as:
$ gem install kumome
$ aws configure
...
$ cat <<EOF > spec/secrets.yml
region: ap-northeast-1
aws_access_key_id: XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
EOF
$ kumome --ec2=i-123ab45c,i-890ed12c --rds=my-rds --elb=my-elb --profile mycreds
$ kumome
Usage:
kumome # OR: `kumome stat`
Options:
[--ec2=InstanceId,..]
[--rds=DBInstanceIdentifier,..]
[--elb=LoadBalancerName,..]
[--profile=PROFILE]
[--period=N]
# Default: 300
[--config=CONFIG]
Show AWS resource statistics
If you show command config YAML, run kumome config
.
Write custom.yml
.
---
resources:
lambda: # "command option name"
namespace: AWS/Lambda # required
dimensions_name: FunctionName # required
metrics:
count:
metric_name: Invocations # required
statistic: Sum # required
unit: Count
alarm: '>=100' # "metric alarm name" or "operator and number"
error:
metric_name: Errors
statistic: Sum
unit: Count
alarm: '>=5'
duration:
metric_name: Duration
statistic: Average
( See https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions-metrics.html )
And use --config
option.
$ kumome --config=./custom.yml
Usage:
kumome # OR: `kumome stat`
Options:
[--lambda=FunctionName,..]
[--profile=PROFILE]
[--period=N]
# Default: 300
[--config=CONFIG]
Show AWS resource statistics
$ kumome --config=./custom.yml --lambda=my-lambda-func-name,hook-lambda-func-name --profile mycreds
tailf
option
- Fork it ( https://github.com/k1LoW/kumome/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request