kumome 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/.gitignore +9 -0
 - data/.rubocop.yml +53 -0
 - data/.travis.yml +3 -0
 - data/Gemfile +4 -0
 - data/LICENSE.txt +21 -0
 - data/README.md +59 -0
 - data/Rakefile +11 -0
 - data/bin/console +6 -0
 - data/bin/setup +7 -0
 - data/exe/kumome +5 -0
 - data/kumome.gemspec +34 -0
 - data/lib/kumome/cli.rb +74 -0
 - data/lib/kumome/config.rb +30 -0
 - data/lib/kumome/default.yml +53 -0
 - data/lib/kumome/option.rb +11 -0
 - data/lib/kumome/stat.rb +64 -0
 - data/lib/kumome/version.rb +3 -0
 - data/lib/kumome.rb +10 -0
 - data/stub/cloudwatch.rb +44 -0
 - metadata +232 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 086fddfea4697332a2dabfda707133a0265eb4c6
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d87ee99f63016ed2c3ce1250b416543a0fc1b377
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: fcd2297ae0424b55cf3c03076c3abb309a5ce7151676fea878912a8de1e01734dff75b356ebed9de146af4f2c82947b5f5a221a257bf9227fee6de7f7dcc340b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: fcd5b05a941b2181dd6a8145fcec62fa95b5e47d7dfdf4895ab061226929073aa7f781704ba353d96d25caf0f21f25e75274dee9eca5c72663cc92b79a48423a
         
     | 
    
        data/.gitignore
    ADDED
    
    
    
        data/.rubocop.yml
    ADDED
    
    | 
         @@ -0,0 +1,53 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            Lint/Eval:
         
     | 
| 
      
 2 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            Lint/HandleExceptions:
         
     | 
| 
      
 5 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Lint/UselessAssignment:
         
     | 
| 
      
 8 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            Metrics/AbcSize:
         
     | 
| 
      
 11 
     | 
    
         
            +
              Max: 50
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            Metrics/ClassLength:
         
     | 
| 
      
 14 
     | 
    
         
            +
              Max: 120
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            Metrics/CyclomaticComplexity:
         
     | 
| 
      
 17 
     | 
    
         
            +
              Max: 15
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            Metrics/LineLength:
         
     | 
| 
      
 20 
     | 
    
         
            +
              Max: 120
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            Metrics/MethodLength:
         
     | 
| 
      
 23 
     | 
    
         
            +
              Max: 30
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            Metrics/PerceivedComplexity:
         
     | 
| 
      
 26 
     | 
    
         
            +
              Max: 15
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            Style/BarePercentLiterals:
         
     | 
| 
      
 29 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            Style/ClassAndModuleChildren:
         
     | 
| 
      
 32 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            Style/Documentation:
         
     | 
| 
      
 35 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            Style/StabbyLambdaParentheses:
         
     | 
| 
      
 38 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
            Style/PercentLiteralDelimiters:
         
     | 
| 
      
 41 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            Style/PredicateName:
         
     | 
| 
      
 44 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            Style/RedundantSelf:
         
     | 
| 
      
 47 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            Style/SymbolProc:
         
     | 
| 
      
 50 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
            Style/BracesAroundHashParameters:
         
     | 
| 
      
 53 
     | 
    
         
            +
              Enabled: false
         
     | 
    
        data/.travis.yml
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            The MIT License (MIT)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Copyright (c) 2016 k1LoW
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining a copy
         
     | 
| 
      
 6 
     | 
    
         
            +
            of this software and associated documentation files (the "Software"), to deal
         
     | 
| 
      
 7 
     | 
    
         
            +
            in the Software without restriction, including without limitation the rights
         
     | 
| 
      
 8 
     | 
    
         
            +
            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         
     | 
| 
      
 9 
     | 
    
         
            +
            copies of the Software, and to permit persons to whom the Software is
         
     | 
| 
      
 10 
     | 
    
         
            +
            furnished to do so, subject to the following conditions:
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be included in
         
     | 
| 
      
 13 
     | 
    
         
            +
            all copies or substantial portions of the Software.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         
     | 
| 
      
 16 
     | 
    
         
            +
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         
     | 
| 
      
 17 
     | 
    
         
            +
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         
     | 
| 
      
 18 
     | 
    
         
            +
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         
     | 
| 
      
 19 
     | 
    
         
            +
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         
     | 
| 
      
 20 
     | 
    
         
            +
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
         
     | 
| 
      
 21 
     | 
    
         
            +
            THE SOFTWARE.
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1,59 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Kumome
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Resource statistics tool via AWS CloudWatch.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Add this line to your application's Gemfile:
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 10 
     | 
    
         
            +
            gem 'kumome'
         
     | 
| 
      
 11 
     | 
    
         
            +
            ```
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            And then execute:
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                $ bundle
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            Or install it yourself as:
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                $ gem install kumome
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            ## Getting Started
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            ### STEP 1. Set AWS credentials
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            #### 1-1. Use Shared Credentials
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            ```sh
         
     | 
| 
      
 28 
     | 
    
         
            +
            $ aws configure
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            ...
         
     | 
| 
      
 31 
     | 
    
         
            +
            ```
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            #### 1-2. Use secrets.yml
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            ```sh
         
     | 
| 
      
 36 
     | 
    
         
            +
            $ cat <<EOF > spec/secrets.yml
         
     | 
| 
      
 37 
     | 
    
         
            +
            region: ap-northeast-1
         
     | 
| 
      
 38 
     | 
    
         
            +
            aws_access_key_id: XXXXXXXXXXXXXXXXXXXX
         
     | 
| 
      
 39 
     | 
    
         
            +
            aws_secret_access_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
         
     | 
| 
      
 40 
     | 
    
         
            +
            EOF
         
     | 
| 
      
 41 
     | 
    
         
            +
            ```
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            ### STEP 2. Show AWS resource statistics
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            ```sh
         
     | 
| 
      
 46 
     | 
    
         
            +
            $ kumome --ec2=i-123ab45c,i-890ed12c --rds=my-rds --elb=my-elb --profile mycreds
         
     | 
| 
      
 47 
     | 
    
         
            +
            ```
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            ## TODO
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
            - `tailf` option
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            ## Contributing
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
            1. Fork it ( https://github.com/k1LoW/kumome/fork )
         
     | 
| 
      
 56 
     | 
    
         
            +
            2. Create your feature branch (`git checkout -b my-new-feature`)
         
     | 
| 
      
 57 
     | 
    
         
            +
            3. Commit your changes (`git commit -am 'Add some feature'`)
         
     | 
| 
      
 58 
     | 
    
         
            +
            4. Push to the branch (`git push origin my-new-feature`)
         
     | 
| 
      
 59 
     | 
    
         
            +
            5. Create a new Pull Request
         
     | 
    
        data/Rakefile
    ADDED
    
    
    
        data/bin/console
    ADDED
    
    
    
        data/bin/setup
    ADDED
    
    
    
        data/exe/kumome
    ADDED
    
    
    
        data/kumome.gemspec
    ADDED
    
    | 
         @@ -0,0 +1,34 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # coding: utf-8
         
     | 
| 
      
 2 
     | 
    
         
            +
            lib = File.expand_path('../lib', __FILE__)
         
     | 
| 
      
 3 
     | 
    
         
            +
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'kumome/version'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            Gem::Specification.new do |spec|
         
     | 
| 
      
 7 
     | 
    
         
            +
              spec.name          = 'kumome'
         
     | 
| 
      
 8 
     | 
    
         
            +
              spec.version       = Kumome::VERSION
         
     | 
| 
      
 9 
     | 
    
         
            +
              spec.authors       = ['k1LoW']
         
     | 
| 
      
 10 
     | 
    
         
            +
              spec.email         = ['k1lowxb@gmail.com']
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              spec.summary       = 'Resource statistics tool via AWS CloudWatch.'
         
     | 
| 
      
 13 
     | 
    
         
            +
              spec.description   = 'Resource statistics tool via AWS CloudWatch.'
         
     | 
| 
      
 14 
     | 
    
         
            +
              spec.homepage      = 'https://github.com/k1LoW/kumome'
         
     | 
| 
      
 15 
     | 
    
         
            +
              spec.license       = 'MIT'
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              spec.files         = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
         
     | 
| 
      
 18 
     | 
    
         
            +
              spec.bindir        = 'exe'
         
     | 
| 
      
 19 
     | 
    
         
            +
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
      
 20 
     | 
    
         
            +
              spec.require_paths = ['lib']
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              spec.add_runtime_dependency 'aws-sdk', '~> 2.1'
         
     | 
| 
      
 23 
     | 
    
         
            +
              spec.add_runtime_dependency 'awsecrets'
         
     | 
| 
      
 24 
     | 
    
         
            +
              spec.add_runtime_dependency 'thor'
         
     | 
| 
      
 25 
     | 
    
         
            +
              spec.add_runtime_dependency 'activesupport'
         
     | 
| 
      
 26 
     | 
    
         
            +
              spec.add_runtime_dependency 'terminal-table'
         
     | 
| 
      
 27 
     | 
    
         
            +
              spec.add_runtime_dependency 'term-ansicolor'
         
     | 
| 
      
 28 
     | 
    
         
            +
              spec.add_development_dependency 'bundler', '~> 1.9'
         
     | 
| 
      
 29 
     | 
    
         
            +
              spec.add_development_dependency 'rake', '~> 10.0'
         
     | 
| 
      
 30 
     | 
    
         
            +
              spec.add_development_dependency 'rspec'
         
     | 
| 
      
 31 
     | 
    
         
            +
              spec.add_development_dependency 'rubocop'
         
     | 
| 
      
 32 
     | 
    
         
            +
              spec.add_development_dependency 'octorelease'
         
     | 
| 
      
 33 
     | 
    
         
            +
              spec.add_development_dependency 'pry'
         
     | 
| 
      
 34 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/kumome/cli.rb
    ADDED
    
    | 
         @@ -0,0 +1,74 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'thor'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'terminal-table/import'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'term/ansicolor'
         
     | 
| 
      
 4 
     | 
    
         
            +
            include Term::ANSIColor
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            module Kumome
         
     | 
| 
      
 7 
     | 
    
         
            +
              include Term::ANSIColor
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              class CLI < Thor
         
     | 
| 
      
 10 
     | 
    
         
            +
                class_option :profile
         
     | 
| 
      
 11 
     | 
    
         
            +
                class_option :period, type: :numeric, default: 300
         
     | 
| 
      
 12 
     | 
    
         
            +
                class_option :config, type: :string
         
     | 
| 
      
 13 
     | 
    
         
            +
                default_command :stat
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                Kumome::Config.load
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                desc 'stat', 'Show AWS resource statistics'
         
     | 
| 
      
 18 
     | 
    
         
            +
                Kumome::Config.config['resources'].each_key do |r|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  option r, type: :string
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
                def stat
         
     | 
| 
      
 22 
     | 
    
         
            +
                  Kumome::Option.load(options)
         
     | 
| 
      
 23 
     | 
    
         
            +
                  data = Kumome::Stat.data
         
     | 
| 
      
 24 
     | 
    
         
            +
                  out_table(data)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  # @TODO tailf stat
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                desc 'config', 'Out config.yml'
         
     | 
| 
      
 29 
     | 
    
         
            +
                def config
         
     | 
| 
      
 30 
     | 
    
         
            +
                  puts File.read(Kumome::Config.parse_argv(ARGV))
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                private
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                def out_table(data)
         
     | 
| 
      
 36 
     | 
    
         
            +
                  ids = {}
         
     | 
| 
      
 37 
     | 
    
         
            +
                  metrics_header = {}
         
     | 
| 
      
 38 
     | 
    
         
            +
                  Kumome::Config.config['resources'].each do |resource_name, resource|
         
     | 
| 
      
 39 
     | 
    
         
            +
                    next if options[resource_name.to_sym].nil?
         
     | 
| 
      
 40 
     | 
    
         
            +
                    options[resource_name.to_sym].split(',').each do |id|
         
     | 
| 
      
 41 
     | 
    
         
            +
                      ids[id] = resource['metrics'].size
         
     | 
| 
      
 42 
     | 
    
         
            +
                      resource['metrics'].each do |name, _metric|
         
     | 
| 
      
 43 
     | 
    
         
            +
                        key = resource_name + id + name.to_s
         
     | 
| 
      
 44 
     | 
    
         
            +
                        metrics_header[key] = name.to_s
         
     | 
| 
      
 45 
     | 
    
         
            +
                      end
         
     | 
| 
      
 46 
     | 
    
         
            +
                    end
         
     | 
| 
      
 47 
     | 
    
         
            +
                  end
         
     | 
| 
      
 48 
     | 
    
         
            +
                  header = ['']
         
     | 
| 
      
 49 
     | 
    
         
            +
                  ids.each do |id, colspan|
         
     | 
| 
      
 50 
     | 
    
         
            +
                    header << { value: id, colspan: colspan, alignment: :center }
         
     | 
| 
      
 51 
     | 
    
         
            +
                  end
         
     | 
| 
      
 52 
     | 
    
         
            +
                  t = table(header)
         
     | 
| 
      
 53 
     | 
    
         
            +
                  t.style = { alignment: :right, border_x: '-' }
         
     | 
| 
      
 54 
     | 
    
         
            +
                  t << metrics_header.values.unshift(:timestamp)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  t << :separator
         
     | 
| 
      
 56 
     | 
    
         
            +
                  data.sort_by { |k, _| k.to_i }.each do |timestamp, d|
         
     | 
| 
      
 57 
     | 
    
         
            +
                    line = [timestamp]
         
     | 
| 
      
 58 
     | 
    
         
            +
                    metrics_header.each_key do |h|
         
     | 
| 
      
 59 
     | 
    
         
            +
                      if d.key?(h)
         
     | 
| 
      
 60 
     | 
    
         
            +
                        line << d[h]
         
     | 
| 
      
 61 
     | 
    
         
            +
                      else
         
     | 
| 
      
 62 
     | 
    
         
            +
                        line << ''
         
     | 
| 
      
 63 
     | 
    
         
            +
                      end
         
     | 
| 
      
 64 
     | 
    
         
            +
                    end
         
     | 
| 
      
 65 
     | 
    
         
            +
                    t << line
         
     | 
| 
      
 66 
     | 
    
         
            +
                  end
         
     | 
| 
      
 67 
     | 
    
         
            +
                  lines = t.to_s.lines
         
     | 
| 
      
 68 
     | 
    
         
            +
                  footer = lines.pop
         
     | 
| 
      
 69 
     | 
    
         
            +
                  lines.each do |line|
         
     | 
| 
      
 70 
     | 
    
         
            +
                    puts line
         
     | 
| 
      
 71 
     | 
    
         
            +
                  end
         
     | 
| 
      
 72 
     | 
    
         
            +
                end
         
     | 
| 
      
 73 
     | 
    
         
            +
              end
         
     | 
| 
      
 74 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'yaml'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Kumome
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Config
         
     | 
| 
      
 5 
     | 
    
         
            +
                def self.config
         
     | 
| 
      
 6 
     | 
    
         
            +
                  @config
         
     | 
| 
      
 7 
     | 
    
         
            +
                end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                def self.parse_argv(argv)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  default_config_path = File.expand_path('./default.yml', File.dirname(__FILE__))
         
     | 
| 
      
 11 
     | 
    
         
            +
                  config_option = argv.find do |arg|
         
     | 
| 
      
 12 
     | 
    
         
            +
                    arg =~ /\A(--config=?|-c=?).*\z/
         
     | 
| 
      
 13 
     | 
    
         
            +
                  end
         
     | 
| 
      
 14 
     | 
    
         
            +
                  if config_option
         
     | 
| 
      
 15 
     | 
    
         
            +
                    if config_option =~ /=/
         
     | 
| 
      
 16 
     | 
    
         
            +
                      config_path = config_option.gsub(/\A(--config=?|-c=?)/, '')
         
     | 
| 
      
 17 
     | 
    
         
            +
                    else
         
     | 
| 
      
 18 
     | 
    
         
            +
                      config_path = argv[argv.index(config_option) + 1]
         
     | 
| 
      
 19 
     | 
    
         
            +
                    end
         
     | 
| 
      
 20 
     | 
    
         
            +
                  end
         
     | 
| 
      
 21 
     | 
    
         
            +
                  config_path = default_config_path if config_path.nil?
         
     | 
| 
      
 22 
     | 
    
         
            +
                  config_path
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                def self.load
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @config = YAML.load_file(parse_argv(ARGV))
         
     | 
| 
      
 27 
     | 
    
         
            +
                  @config
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,53 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            resources:
         
     | 
| 
      
 3 
     | 
    
         
            +
              ec2:
         
     | 
| 
      
 4 
     | 
    
         
            +
                namespace: AWS/EC2 # required
         
     | 
| 
      
 5 
     | 
    
         
            +
                dimensions_name: InstanceId # required
         
     | 
| 
      
 6 
     | 
    
         
            +
                metrics:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  cpu:
         
     | 
| 
      
 8 
     | 
    
         
            +
                    metric_name: CPUUtilization # required
         
     | 
| 
      
 9 
     | 
    
         
            +
                    statistic: Average # required
         
     | 
| 
      
 10 
     | 
    
         
            +
                    unit: Percent
         
     | 
| 
      
 11 
     | 
    
         
            +
                    alarm: '>=50' # "metric alarm name" or "operator and number"
         
     | 
| 
      
 12 
     | 
    
         
            +
                  netin:
         
     | 
| 
      
 13 
     | 
    
         
            +
                    metric_name: NetworkIn
         
     | 
| 
      
 14 
     | 
    
         
            +
                    statistic: Average
         
     | 
| 
      
 15 
     | 
    
         
            +
                    unit: Bytes
         
     | 
| 
      
 16 
     | 
    
         
            +
                  netout:
         
     | 
| 
      
 17 
     | 
    
         
            +
                    metric_name: NetworkOut 
         
     | 
| 
      
 18 
     | 
    
         
            +
                    statistic: Average
         
     | 
| 
      
 19 
     | 
    
         
            +
                    unit: Bytes
         
     | 
| 
      
 20 
     | 
    
         
            +
              rds:
         
     | 
| 
      
 21 
     | 
    
         
            +
                namespace: AWS/RDS
         
     | 
| 
      
 22 
     | 
    
         
            +
                dimensions_name: DBInstanceIdentifier
         
     | 
| 
      
 23 
     | 
    
         
            +
                metrics:
         
     | 
| 
      
 24 
     | 
    
         
            +
                  cpu:
         
     | 
| 
      
 25 
     | 
    
         
            +
                    metric_name: CPUUtilization
         
     | 
| 
      
 26 
     | 
    
         
            +
                    statistic: Average
         
     | 
| 
      
 27 
     | 
    
         
            +
                    unit: Percent
         
     | 
| 
      
 28 
     | 
    
         
            +
                    alarm: '>=50'
         
     | 
| 
      
 29 
     | 
    
         
            +
                  read:
         
     | 
| 
      
 30 
     | 
    
         
            +
                    metric_name: ReadIOPS
         
     | 
| 
      
 31 
     | 
    
         
            +
                    statistic: Average
         
     | 
| 
      
 32 
     | 
    
         
            +
                    unit: Count/Second
         
     | 
| 
      
 33 
     | 
    
         
            +
                  write:
         
     | 
| 
      
 34 
     | 
    
         
            +
                    metric_name: WriteIOPS
         
     | 
| 
      
 35 
     | 
    
         
            +
                    statistic: Average
         
     | 
| 
      
 36 
     | 
    
         
            +
                  conn:
         
     | 
| 
      
 37 
     | 
    
         
            +
                    metric_name: DatabaseConnections
         
     | 
| 
      
 38 
     | 
    
         
            +
                    statistic: Average
         
     | 
| 
      
 39 
     | 
    
         
            +
                    unit: Count
         
     | 
| 
      
 40 
     | 
    
         
            +
                    alarm: '>=50'
         
     | 
| 
      
 41 
     | 
    
         
            +
              elb:
         
     | 
| 
      
 42 
     | 
    
         
            +
                namespace: AWS/ELB
         
     | 
| 
      
 43 
     | 
    
         
            +
                dimensions_name: LoadBalancerName
         
     | 
| 
      
 44 
     | 
    
         
            +
                metrics:
         
     | 
| 
      
 45 
     | 
    
         
            +
                  req:
         
     | 
| 
      
 46 
     | 
    
         
            +
                    metric_name: RequestCount
         
     | 
| 
      
 47 
     | 
    
         
            +
                    statistic: Sum
         
     | 
| 
      
 48 
     | 
    
         
            +
                  400:
         
     | 
| 
      
 49 
     | 
    
         
            +
                    metric_name: HTTPCode_Backend_4XX
         
     | 
| 
      
 50 
     | 
    
         
            +
                    statistic: Sum
         
     | 
| 
      
 51 
     | 
    
         
            +
                  500:
         
     | 
| 
      
 52 
     | 
    
         
            +
                    metric_name: HTTPCode_Backend_5XX
         
     | 
| 
      
 53 
     | 
    
         
            +
                    statistic: Sum
         
     | 
    
        data/lib/kumome/stat.rb
    ADDED
    
    | 
         @@ -0,0 +1,64 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'awsecrets'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Kumome
         
     | 
| 
      
 4 
     | 
    
         
            +
              class Stat
         
     | 
| 
      
 5 
     | 
    
         
            +
                OPERATORS = {
         
     | 
| 
      
 6 
     | 
    
         
            +
                  'GreaterThanOrEqualToThreshold' => '>=',
         
     | 
| 
      
 7 
     | 
    
         
            +
                  'GreaterThanThreshold' => '>',
         
     | 
| 
      
 8 
     | 
    
         
            +
                  'LessThanThreshold' => '<',
         
     | 
| 
      
 9 
     | 
    
         
            +
                  'LessThanOrEqualToThreshold' => '<='
         
     | 
| 
      
 10 
     | 
    
         
            +
                }
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                def self.data
         
     | 
| 
      
 13 
     | 
    
         
            +
                  options = Kumome::Option.options
         
     | 
| 
      
 14 
     | 
    
         
            +
                  Awsecrets.load(profile: options[:profile])
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @client = Aws::CloudWatch::Client.new
         
     | 
| 
      
 16 
     | 
    
         
            +
                  ids = {}
         
     | 
| 
      
 17 
     | 
    
         
            +
                  metrics_header = {}
         
     | 
| 
      
 18 
     | 
    
         
            +
                  data = {}
         
     | 
| 
      
 19 
     | 
    
         
            +
                  Kumome::Config.config['resources'].each do |resource_name, resource|
         
     | 
| 
      
 20 
     | 
    
         
            +
                    next if options[resource_name.to_sym].nil?
         
     | 
| 
      
 21 
     | 
    
         
            +
                    options[resource_name.to_sym].split(',').each do |id|
         
     | 
| 
      
 22 
     | 
    
         
            +
                      resource['metrics'].each do |name, metric|
         
     | 
| 
      
 23 
     | 
    
         
            +
                        key = resource_name + id + name.to_s
         
     | 
| 
      
 24 
     | 
    
         
            +
                        config = build_cw_config(resource, metric, options, id)
         
     | 
| 
      
 25 
     | 
    
         
            +
                        output = @client.get_metric_statistics(config)
         
     | 
| 
      
 26 
     | 
    
         
            +
                        output.datapoints.each do |point|
         
     | 
| 
      
 27 
     | 
    
         
            +
                          data[point.timestamp] = {} unless data.key?(point.timestamp)
         
     | 
| 
      
 28 
     | 
    
         
            +
                          data[point.timestamp][key] = colorize(point[metric['statistic'].underscore], metric['alarm'])
         
     | 
| 
      
 29 
     | 
    
         
            +
                        end
         
     | 
| 
      
 30 
     | 
    
         
            +
                      end
         
     | 
| 
      
 31 
     | 
    
         
            +
                    end
         
     | 
| 
      
 32 
     | 
    
         
            +
                  end
         
     | 
| 
      
 33 
     | 
    
         
            +
                  data
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                def self.build_cw_config(resource, metric, options, id)
         
     | 
| 
      
 37 
     | 
    
         
            +
                  config = {
         
     | 
| 
      
 38 
     | 
    
         
            +
                    metric_name: metric['metric_name'],
         
     | 
| 
      
 39 
     | 
    
         
            +
                    namespace: resource['namespace'],
         
     | 
| 
      
 40 
     | 
    
         
            +
                    statistics: [metric['statistic']],
         
     | 
| 
      
 41 
     | 
    
         
            +
                    dimensions: [{ name: resource['dimensions_name'], value: id }],
         
     | 
| 
      
 42 
     | 
    
         
            +
                    start_time: (Time.now - 3600).iso8601,
         
     | 
| 
      
 43 
     | 
    
         
            +
                    end_time: Time.now.iso8601,
         
     | 
| 
      
 44 
     | 
    
         
            +
                    period: options[:period]
         
     | 
| 
      
 45 
     | 
    
         
            +
                  }
         
     | 
| 
      
 46 
     | 
    
         
            +
                  config[:unit] = metric['unit'] if metric['unit']
         
     | 
| 
      
 47 
     | 
    
         
            +
                  config
         
     | 
| 
      
 48 
     | 
    
         
            +
                end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                def self.colorize(point, alarm)
         
     | 
| 
      
 51 
     | 
    
         
            +
                  point = point.round(1).to_s
         
     | 
| 
      
 52 
     | 
    
         
            +
                  return point unless alarm
         
     | 
| 
      
 53 
     | 
    
         
            +
                  if /^[<>=]/ !~ alarm
         
     | 
| 
      
 54 
     | 
    
         
            +
                    res = @client.describe_alarms({
         
     | 
| 
      
 55 
     | 
    
         
            +
                                                    alarm_names: [alarm]
         
     | 
| 
      
 56 
     | 
    
         
            +
                                                  })
         
     | 
| 
      
 57 
     | 
    
         
            +
                    metric_alarm = res.metric_alarms.first
         
     | 
| 
      
 58 
     | 
    
         
            +
                    alarm = OPERATORS[metric_alarm.comparison_operator] + metric_alarm.threshold.to_s
         
     | 
| 
      
 59 
     | 
    
         
            +
                  end
         
     | 
| 
      
 60 
     | 
    
         
            +
                  point = point.red if eval("#{point} #{alarm}")
         
     | 
| 
      
 61 
     | 
    
         
            +
                  point
         
     | 
| 
      
 62 
     | 
    
         
            +
                end
         
     | 
| 
      
 63 
     | 
    
         
            +
              end
         
     | 
| 
      
 64 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/kumome.rb
    ADDED
    
    
    
        data/stub/cloudwatch.rb
    ADDED
    
    | 
         @@ -0,0 +1,44 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # rubocop:disable all
         
     | 
| 
      
 2 
     | 
    
         
            +
            Aws.config[:cloudwatch] = {
         
     | 
| 
      
 3 
     | 
    
         
            +
              stub_responses: {
         
     | 
| 
      
 4 
     | 
    
         
            +
                get_metric_statistics: {
         
     | 
| 
      
 5 
     | 
    
         
            +
                  datapoints: [
         
     | 
| 
      
 6 
     | 
    
         
            +
                    
         
     | 
| 
      
 7 
     | 
    
         
            +
                  ]
         
     | 
| 
      
 8 
     | 
    
         
            +
                },
         
     | 
| 
      
 9 
     | 
    
         
            +
                describe_alarms: {
         
     | 
| 
      
 10 
     | 
    
         
            +
                  metric_alarms: [
         
     | 
| 
      
 11 
     | 
    
         
            +
                    {
         
     | 
| 
      
 12 
     | 
    
         
            +
                      alarm_name: 'my-cloudwatch-alarm',
         
     | 
| 
      
 13 
     | 
    
         
            +
                      alarm_arn: 'arn:aws:cloudwatch:ap-northeast-1:1234567890:alarm:my_NumberOfProcesses',
         
     | 
| 
      
 14 
     | 
    
         
            +
                      alarm_description: 'my_NumberOfProcesses',
         
     | 
| 
      
 15 
     | 
    
         
            +
                      alarm_configuration_updated_timestamp: Time.new(2015, 1, 2, 10, 00, 00, '+00:00'),
         
     | 
| 
      
 16 
     | 
    
         
            +
                      actions_enabled: true,
         
     | 
| 
      
 17 
     | 
    
         
            +
                      ok_actions: ['arn:aws:sns:ap-northeast-1:1234567890:sns_alert'],
         
     | 
| 
      
 18 
     | 
    
         
            +
                      alarm_actions: ['arn:aws:sns:ap-northeast-1:1234567890:sns_alert'],
         
     | 
| 
      
 19 
     | 
    
         
            +
                      insufficient_data_actions: ['arn:aws:sns:ap-northeast-1:1234567890:sns_alert'],
         
     | 
| 
      
 20 
     | 
    
         
            +
                      state_value: 'OK',
         
     | 
| 
      
 21 
     | 
    
         
            +
                      state_reason: 'Threshold Crossed: 1 datapoint (53.0) was not less than or equal to the threshold (5.0).',
         
     | 
| 
      
 22 
     | 
    
         
            +
                      state_reason_data:
         
     | 
| 
      
 23 
     | 
    
         
            +
                        '{\'version\':\'1.0\',\'queryDate\':\'2015-04-04T01:06:26.904+0000\',\'startDate\':\'2015-04-04T01:01:00.000+0000\',\'statistic\':\'Average\',\'period\':300,\'recentDatapoints\':[53.0],\'threshold\':5.0}',
         
     | 
| 
      
 24 
     | 
    
         
            +
                      state_updated_timestamp: Time.new(2015, 1, 2, 10, 10, 00, '+00:00'),
         
     | 
| 
      
 25 
     | 
    
         
            +
                      metric_name: 'NumberOfProcesses',
         
     | 
| 
      
 26 
     | 
    
         
            +
                      namespace: 'my-cloudwatch-namespace',
         
     | 
| 
      
 27 
     | 
    
         
            +
                      statistic: 'Average',
         
     | 
| 
      
 28 
     | 
    
         
            +
                      dimensions:
         
     | 
| 
      
 29 
     | 
    
         
            +
                        [
         
     | 
| 
      
 30 
     | 
    
         
            +
                          {
         
     | 
| 
      
 31 
     | 
    
         
            +
                            name: 'name',
         
     | 
| 
      
 32 
     | 
    
         
            +
                            value: 'my-dimension'
         
     | 
| 
      
 33 
     | 
    
         
            +
                          }
         
     | 
| 
      
 34 
     | 
    
         
            +
                        ],
         
     | 
| 
      
 35 
     | 
    
         
            +
                      period: 300,
         
     | 
| 
      
 36 
     | 
    
         
            +
                      unit: 'Seconds',
         
     | 
| 
      
 37 
     | 
    
         
            +
                      evaluation_periods: 1,
         
     | 
| 
      
 38 
     | 
    
         
            +
                      threshold: 5.0,
         
     | 
| 
      
 39 
     | 
    
         
            +
                      comparison_operator: 'LessThanOrEqualToThreshold'
         
     | 
| 
      
 40 
     | 
    
         
            +
                    }
         
     | 
| 
      
 41 
     | 
    
         
            +
                  ]
         
     | 
| 
      
 42 
     | 
    
         
            +
                }
         
     | 
| 
      
 43 
     | 
    
         
            +
              }
         
     | 
| 
      
 44 
     | 
    
         
            +
            }
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,232 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: kumome
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - k1LoW
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: exe
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-01-28 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: aws-sdk
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '2.1'
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '2.1'
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: awsecrets
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 41 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 42 
     | 
    
         
            +
              name: thor
         
     | 
| 
      
 43 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 44 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 45 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 47 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 55 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 56 
     | 
    
         
            +
              name: activesupport
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 58 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 59 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 62 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 63 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 64 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 65 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 67 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 69 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 70 
     | 
    
         
            +
              name: terminal-table
         
     | 
| 
      
 71 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 72 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 73 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 74 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 75 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 76 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 77 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 78 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 79 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 80 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 82 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 83 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 84 
     | 
    
         
            +
              name: term-ansicolor
         
     | 
| 
      
 85 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 86 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 87 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 88 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 89 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 90 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 91 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 92 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 93 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 94 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 95 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 96 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 97 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 98 
     | 
    
         
            +
              name: bundler
         
     | 
| 
      
 99 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 100 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 101 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 102 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 103 
     | 
    
         
            +
                    version: '1.9'
         
     | 
| 
      
 104 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 105 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 106 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 107 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 108 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 109 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 110 
     | 
    
         
            +
                    version: '1.9'
         
     | 
| 
      
 111 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 112 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 113 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 114 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 115 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 116 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 117 
     | 
    
         
            +
                    version: '10.0'
         
     | 
| 
      
 118 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 119 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 120 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 121 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 122 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 123 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 124 
     | 
    
         
            +
                    version: '10.0'
         
     | 
| 
      
 125 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 126 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 127 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 128 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 129 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 130 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 131 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 132 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 133 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 134 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 135 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 136 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 137 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 138 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 139 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 140 
     | 
    
         
            +
              name: rubocop
         
     | 
| 
      
 141 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 142 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 143 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 144 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 145 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 146 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 147 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 148 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 149 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 150 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 151 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 152 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 153 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 154 
     | 
    
         
            +
              name: octorelease
         
     | 
| 
      
 155 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 156 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 157 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 158 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 159 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 160 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 161 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 162 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 163 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 164 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 165 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 166 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 167 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 168 
     | 
    
         
            +
              name: pry
         
     | 
| 
      
 169 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 170 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 171 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 172 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 173 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 174 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 175 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 176 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 177 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 178 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 179 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 180 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 181 
     | 
    
         
            +
            description: Resource statistics tool via AWS CloudWatch.
         
     | 
| 
      
 182 
     | 
    
         
            +
            email:
         
     | 
| 
      
 183 
     | 
    
         
            +
            - k1lowxb@gmail.com
         
     | 
| 
      
 184 
     | 
    
         
            +
            executables:
         
     | 
| 
      
 185 
     | 
    
         
            +
            - kumome
         
     | 
| 
      
 186 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 187 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 188 
     | 
    
         
            +
            files:
         
     | 
| 
      
 189 
     | 
    
         
            +
            - ".gitignore"
         
     | 
| 
      
 190 
     | 
    
         
            +
            - ".rubocop.yml"
         
     | 
| 
      
 191 
     | 
    
         
            +
            - ".travis.yml"
         
     | 
| 
      
 192 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 193 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 194 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 195 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 196 
     | 
    
         
            +
            - bin/console
         
     | 
| 
      
 197 
     | 
    
         
            +
            - bin/setup
         
     | 
| 
      
 198 
     | 
    
         
            +
            - exe/kumome
         
     | 
| 
      
 199 
     | 
    
         
            +
            - kumome.gemspec
         
     | 
| 
      
 200 
     | 
    
         
            +
            - lib/kumome.rb
         
     | 
| 
      
 201 
     | 
    
         
            +
            - lib/kumome/cli.rb
         
     | 
| 
      
 202 
     | 
    
         
            +
            - lib/kumome/config.rb
         
     | 
| 
      
 203 
     | 
    
         
            +
            - lib/kumome/default.yml
         
     | 
| 
      
 204 
     | 
    
         
            +
            - lib/kumome/option.rb
         
     | 
| 
      
 205 
     | 
    
         
            +
            - lib/kumome/stat.rb
         
     | 
| 
      
 206 
     | 
    
         
            +
            - lib/kumome/version.rb
         
     | 
| 
      
 207 
     | 
    
         
            +
            - stub/cloudwatch.rb
         
     | 
| 
      
 208 
     | 
    
         
            +
            homepage: https://github.com/k1LoW/kumome
         
     | 
| 
      
 209 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 210 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 211 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 212 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 213 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 214 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 215 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 216 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 217 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 218 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 219 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 220 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 221 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 222 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 223 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 224 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 225 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 226 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 227 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 228 
     | 
    
         
            +
            rubygems_version: 2.2.2
         
     | 
| 
      
 229 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 230 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 231 
     | 
    
         
            +
            summary: Resource statistics tool via AWS CloudWatch.
         
     | 
| 
      
 232 
     | 
    
         
            +
            test_files: []
         
     |