healthaid 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in healthaid.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Genki Sugawara
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,50 @@
1
+ # Healthaid
2
+
3
+ Healthaid is a daemon that monitors the health status of the service.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'healthaid'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install healthaid
18
+
19
+ ## Usage
20
+
21
+ ### Starting Server
22
+
23
+ ```sh
24
+ healthaid restart -s 'healthaid/plugin/shell' -c '{"command":"mysqladmin ping -h 127.0.0.1"}'
25
+ ```
26
+
27
+ ### Health Checking
28
+
29
+ ```
30
+ curl localhost:11180
31
+ ```
32
+
33
+ ### Showing Status
34
+
35
+ ```sh
36
+ healthaidctl status
37
+ ```
38
+
39
+ ```
40
+ ---
41
+ healthy: true
42
+ enabled: true
43
+ script: healthaid/plugin/shell
44
+ config: ! '{"command":"mysqladmin ping -h 127.0.0.1"}'
45
+ interval: 3
46
+ debug: true
47
+ threshold:
48
+ healthy: 1
49
+ unhealthy: 3
50
+ ```
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ $: << Pathname.new(__FILE__).expand_path.dirname.join('../lib').to_s
4
+
5
+ require 'optparse'
6
+ require 'json'
7
+ require 'healthaid'
8
+
9
+ options = nil
10
+
11
+ ARGV.options do |parser|
12
+ daemon_commands = %w(start stop restart status)
13
+
14
+ options = {
15
+ :config => {},
16
+ :healthy => 1,
17
+ :unhealthy => 3,
18
+ :addr => '0.0.0.0',
19
+ :port => 11180,
20
+ :interval => 3,
21
+ :working_dir => '/var',
22
+ :socket => "/var/tmp/#{APP_NAME}.sock",
23
+ :debug => false,
24
+ }
25
+
26
+ parser.on('-s', '--script=PATH' ) {|v| options[:script] = v }
27
+
28
+ parser.on('-c', '--config=JSON' ) {|v|
29
+ options[:config] = File.readable?(v) ? open(v) {|f| JSON.load(f) } : JSON.load(v)
30
+ }
31
+
32
+ parser.on('', '--healthy=N' ) {|v| options[:healthy] = v.to_i }
33
+ parser.on('', '--unhealthy=N' ) {|v| options[:unhealthy] = v.to_i }
34
+ parser.on('-a', '--addr=ADDR' ) {|v| options[:addr] = v }
35
+ parser.on('-p', '--port=PORT' ) {|v| options[:port] = v.to_i }
36
+ parser.on('-i', '--inerval=N' ) {|v| options[:interval] = v.to_i }
37
+ parser.on('-n', '--threads=SIZE' ) {|v| options[:threads] = v.to_i }
38
+ parser.on('-W', '--working-dir=DIR') {|v| options[:working_dir] = v }
39
+ parser.on('-S', '--socket=FILE' ) {|v| options[:socket] = v }
40
+ parser.on('', '--debug' ) { options[:debug] = true }
41
+
42
+ unless options[:socket]
43
+ options[:socket] = File.join(options[:working_dir], "tmp/#{APP_NAME}.sock")
44
+ end
45
+
46
+ help_and_exit = lambda do |v|
47
+ $stderr.puts parser.help.sub(APP_NAME, "#{APP_NAME} {#{daemon_commands.join('|')}}")
48
+ exit 1
49
+ end
50
+
51
+ parser.on('-h', '--help', &help_and_exit)
52
+
53
+ parser.parse!
54
+
55
+ if ARGV.length != 1 or not daemon_commands.include?(ARGV[0]) or (ARGV[0] == 'start' and not options[:script])
56
+ help_and_exit.call(true)
57
+ end
58
+ end # parse options
59
+
60
+ Healthaid::Server.options = options
61
+ Healthaid::Server.daemonize
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env ruby
2
+ $: << File.expand_path(File.dirname(__FILE__) + '/../lib')
3
+
4
+ require 'drb/drb'
5
+ require 'json'
6
+ require 'optparse'
7
+ require 'yaml'
8
+ require 'healthaid/version'
9
+
10
+ COMMAND_NAME = File.basename(__FILE__)
11
+
12
+ COMMANDS = {
13
+ 'enable' => lambda {|controller|
14
+ controller.enable
15
+ },
16
+ 'disable' => lambda {|controller|
17
+ controller.disable
18
+ },
19
+ 'status' => lambda {|controller|
20
+ puts YAML.dump(controller.status)
21
+ },
22
+ 'reload-script' => lambda {|controller|
23
+ controller.reload_script
24
+ },
25
+ 'set-script' => lambda {|controller, args|
26
+ value = args[0]
27
+ controller.script = value
28
+ },
29
+ 'set-config' => lambda {|controller, args|
30
+ value = args[0]
31
+ controller.config = File.readable?(value) ? open(value) {|f| JSON.load(f) } : JSON.load(value)
32
+ },
33
+ 'set-interval' => lambda {|controller, args|
34
+ value = args[0]
35
+ controller.interval = value.to_i
36
+ },
37
+ 'set-debug' => lambda {|controller, args|
38
+ value = args[0]
39
+ controller.debug = !!(/#{Regexp.escape(value)}/i =~ 'true')
40
+ },
41
+ 'set-healthy' => lambda {|controller, args|
42
+ value = args[0]
43
+ controller.healthy = value.to_i
44
+ },
45
+ 'set-unhealthy' => lambda {|controller, args|
46
+ value = args[0]
47
+ controller.unhealthy = value.to_i
48
+ },
49
+ }
50
+
51
+ options = nil
52
+
53
+ ARGV.options do |parser|
54
+ cmds = COMMANDS.keys
55
+
56
+ options = {
57
+ :socket => "/var/tmp/#{APP_NAME}.sock",
58
+ }
59
+
60
+ parser.on('-S', '--socket=SOCK_FILE') {|v| options[:socket] = v }
61
+
62
+ help_and_exit = lambda do |v|
63
+ $stderr.puts parser.help.sub(COMMAND_NAME, "#{COMMAND_NAME} {#{cmds.join('|')}}")
64
+ exit 1
65
+ end
66
+
67
+ parser.on('-h', '--help', &help_and_exit)
68
+
69
+ parser.parse!
70
+
71
+ unless ARGV.length >= 1 and cmds.include?(ARGV[0])
72
+ help_and_exit.call(true)
73
+ end
74
+ end # parse options
75
+
76
+ controller = DRbObject.new_with_uri("drbunix:#{options[:socket]}")
77
+
78
+ cmd = COMMANDS.fetch(ARGV[0])
79
+
80
+ if cmd.arity > 1
81
+ cmd.call(controller, ARGV[1..-1])
82
+ else
83
+ cmd.call(controller)
84
+ end
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'healthaid/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "healthaid"
8
+ spec.version = Healthaid::VERSION
9
+ spec.authors = ["Genki Sugawara"]
10
+ spec.email = ["sugawara@cookpad.com"]
11
+ spec.description = %q{Healthaid is a daemon that monitors the health status of the service.}
12
+ spec.summary = %q{Healthaid is a daemon that monitors the health status of the service.}
13
+ spec.homepage = "https://bitbucket.org/winebarrel/healthaid"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "mysql2"
24
+
25
+ spec.add_dependency 'rexec', '~> 1.6.0'
26
+ spec.add_dependency 'eventmachine', '~> 1.0.3'
27
+ spec.add_dependency 'eventmachine_httpserver', '~> 0.2.1'
28
+ spec.add_dependency 'em-http-request', '~> 1.1.0'
29
+ spec.add_dependency 'json'
30
+ end
@@ -0,0 +1,6 @@
1
+ require 'healthaid/version'
2
+ require 'healthaid/controller'
3
+ require 'healthaid/http-server'
4
+ require 'healthaid/medic'
5
+ require 'healthaid/server'
6
+ require 'healthaid/status'
@@ -0,0 +1,60 @@
1
+ module Healthaid
2
+ class Controller
3
+ def initialize(server)
4
+ @server = server
5
+ end
6
+
7
+ def status
8
+ {
9
+ 'healthy' => @server.status.healthy?,
10
+ 'enabled' => @server.status.enabled?,
11
+ 'script' => @server.options[:script],
12
+ 'config' => JSON.dump(@server.options[:config]),
13
+ 'interval' => @server.options[:interval],
14
+ 'debug' => !!@server.options[:debug],
15
+ 'threshold' => {
16
+ 'healthy' => @server.options[:healthy],
17
+ 'unhealthy' => @server.options[:unhealthy],
18
+ }
19
+ }
20
+ end
21
+
22
+ def enable
23
+ @server.status.enable
24
+ end
25
+
26
+ def disable
27
+ @server.status.disable
28
+ end
29
+
30
+ def reload_script
31
+ @server.reload_script
32
+ end
33
+
34
+ def script=(value)
35
+ @server.options[:script] = value
36
+ end
37
+
38
+ def config=(value)
39
+ @server.options[:config] = value
40
+ end
41
+
42
+ def debug=(value)
43
+ @server.options[:debug] = !!value
44
+ @server.update_loglevel
45
+ end
46
+
47
+ def interval=(value)
48
+ @server.options[:interval] = value.to_i
49
+ @server.update_interval
50
+ end
51
+
52
+ def healthy=(value)
53
+ @server.options[:healthy] = value.to_i
54
+ end
55
+
56
+ def unhealthy=(value)
57
+ @server.options[:unhealthy] = value.to_i
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,31 @@
1
+ require 'eventmachine'
2
+ require 'evma_httpserver'
3
+
4
+ module Healthaid
5
+ class HttpServer < EM::Connection
6
+ include EM::HttpServer
7
+
8
+ OK = 200
9
+ NG = 503
10
+
11
+ def initialize(server)
12
+ @server = server
13
+ end
14
+
15
+ def process_http_request
16
+ res = EM::DelegatedHttpResponse.new(self)
17
+ res.content_type 'text/plain'
18
+
19
+ @server.logger.debug("receive request: hash=#{res.hash}")
20
+
21
+ EM::defer do
22
+ res.status = @server.status.available? ? OK : NG
23
+ res.content = res.status
24
+
25
+ @server.logger.debug("send response: hash=#{res.hash} status=#{res.status}")
26
+
27
+ res.send_response
28
+ end
29
+ end
30
+ end # HttpServer
31
+ end # Healthaid
@@ -0,0 +1,80 @@
1
+ module Healthaid
2
+ class Medic
3
+ def initialize(server)
4
+ @server = server
5
+ end
6
+
7
+ def run
8
+ begin
9
+ load_script
10
+ @server.logger.debug("run scipt: #{@server.options[:script]}")
11
+ @script.check
12
+ rescue => e
13
+ @server.logger.error e.message
14
+ @server.logger.debug e.backtrace.join("\n")
15
+ @server.status.add_unhealthy
16
+ end
17
+ end
18
+
19
+ def reset_script
20
+ @script = nil
21
+ end
22
+
23
+ private
24
+ def load_script
25
+ return @script if @script
26
+
27
+ @server.logger.debug("load scipt: #{@server.options[:script]} config=#{JSON.dump @server.options[:config]}")
28
+ script = @server.options.fetch(:script)
29
+ loaded = false
30
+
31
+ if File.readable?(script)
32
+ load(script)
33
+ loaded = true
34
+ else
35
+ $:.each {|dir|
36
+ path = File.join(dir, script)
37
+
38
+ if File.readable?(path)
39
+ load(path)
40
+ loaded = true
41
+ break
42
+ end
43
+
44
+ path += '.rb'
45
+
46
+ if File.readable?(path)
47
+ load(path)
48
+ loaded = true
49
+ break
50
+ end
51
+ }
52
+ end
53
+
54
+ raise LoadError, "cannot load such file -- #{script}" unless loaded
55
+
56
+ @script = create_script(script)
57
+ end
58
+
59
+ def create_script(script)
60
+ class_name = File.basename(script, '.rb').split(/[-_]+/).map {|i| i.split(//) }
61
+ class_name = class_name.map {|i| i[0].upcase + i[1..-1].join.downcase }.join
62
+ clazz = Healthaid::Plugin.const_get(class_name)
63
+
64
+ config = @server.options.fetch(:config)
65
+ config = symbolize_keys(config)
66
+ Healthaid::Plugin.const_get(class_name).new(@server.status, config, @server.logger)
67
+ end
68
+
69
+ def symbolize_keys(src)
70
+ dst = {}
71
+
72
+ src.each do |key, value|
73
+ dst[key] = value
74
+ dst[key.to_sym] = value
75
+ end
76
+
77
+ return dst
78
+ end
79
+ end # Medic
80
+ end # Healthaid
@@ -0,0 +1,49 @@
1
+ require 'em-http-request'
2
+
3
+ module Healthaid
4
+ module Plugin
5
+
6
+ class Http
7
+ def initialize(status, config, logger)
8
+ @status = status
9
+ @config = config
10
+ @logger = logger
11
+ end
12
+
13
+ def check
14
+ uri = @config.fetch(:uri, 'http://127.0.0.1/')
15
+ ok = @config[:ok] || [200]
16
+
17
+ case ok
18
+ when String
19
+ ok = ok.strip.split(/\s*,\s*/).map {|i| i.to_i }
20
+ ok = [200] if ok.empty?
21
+ when Array
22
+ ok = ok.map {|i| i.to_i }
23
+ else
24
+ ok = [ok.to_i]
25
+ end
26
+
27
+ timeout = @config.fetch(:timeout, 1).to_i
28
+ @config[:connect_timeout] ||= timeout
29
+ @config[:inactivity_timeout] ||= timeout
30
+
31
+ http = EM::HttpRequest.new(uri, @config).get
32
+ http.timeout(timeout)
33
+
34
+ http.callback do
35
+ if ok.include?(http.response_header.status)
36
+ @status.add_healthy
37
+ else
38
+ @status.add_unhealthy
39
+ end
40
+ end
41
+
42
+ http.errback do
43
+ @status.add_unhealthy
44
+ end
45
+ end
46
+ end # Http
47
+
48
+ end # Plugin
49
+ end # Healthaid
@@ -0,0 +1,37 @@
1
+ require 'mysql2/em'
2
+
3
+ module Healthaid
4
+ module Plugin
5
+
6
+ class Mysql
7
+ def initialize(status, config, logger)
8
+ @status = status
9
+ @config = config
10
+ @logger = logger
11
+ end
12
+
13
+ def check
14
+ timeout = @config.fetch(:timeout, 1).to_i
15
+ @config[:read_timeout] ||= timeout
16
+ @config[:write_timeout] ||= timeout
17
+ @config[:connect_timeout] ||= timeout
18
+
19
+ client = Mysql2::EM::Client.new(@config)
20
+ defer = client.query(@config.fetch(:query, 'SELECT 1'))
21
+
22
+ defer.timeout(timeout)
23
+
24
+ defer.callback do
25
+ @status.add_healthy
26
+ client.close
27
+ end
28
+
29
+ defer.errback do
30
+ @status.add_unhealthy
31
+ client.close
32
+ end
33
+ end
34
+ end # Mysql
35
+
36
+ end # Plugin
37
+ end # Healthaid
@@ -0,0 +1,45 @@
1
+ module Healthaid
2
+ module Plugin
3
+
4
+ class Shell
5
+ class Handler < EventMachine::Connection
6
+ include EM::Deferrable
7
+
8
+ def initialize
9
+ super
10
+ @data = []
11
+ end
12
+
13
+ def receive_data data
14
+ @data << data
15
+ end
16
+
17
+ def unbind
18
+ if get_status.success?
19
+ succeed(@data.join)
20
+ else
21
+ fail(@data.join)
22
+ end
23
+ end
24
+ end # Handler
25
+
26
+ def initialize(status, config, logger)
27
+ @status = status
28
+ @config = config
29
+ @logger = logger
30
+ end
31
+
32
+ def check
33
+ timeout = @config.fetch(:timeout, 1).to_i
34
+ command = @config.fetch(:command)
35
+
36
+ defer = EM.popen(command, Handler)
37
+
38
+ defer.timeout(timeout)
39
+ defer.callback { @status.add_healthy }
40
+ defer.errback { @status.add_unhealthy }
41
+ end
42
+ end # Mysql
43
+
44
+ end # Plugin
45
+ end # Healthaid
@@ -0,0 +1,102 @@
1
+ require 'drb/drb'
2
+ require 'fileutils'
3
+ require 'logger'
4
+ require 'rexec'
5
+ require 'rexec/daemon'
6
+ require 'eventmachine'
7
+ require 'evma_httpserver'
8
+
9
+ module Healthaid
10
+ class Server < RExec::Daemon::Base
11
+ class << self
12
+ def options=(options)
13
+ @@options = options
14
+ @@base_directory = options[:working_dir]
15
+ @@controller = Healthaid::Controller.new(self)
16
+ @@status = Healthaid::Status.new(self)
17
+ @@medic = Healthaid::Medic.new(self)
18
+ @@timer = nil
19
+ @@logger = nil
20
+ end
21
+
22
+ def options; @@options; end
23
+ def status; @@status; end
24
+ def medic; @@medic; end
25
+ def timer; @@timer; end
26
+ def logger; @@logger; end
27
+
28
+ def run
29
+ trap(:PIPE, nil)
30
+
31
+ @@logger = Logger.new(STDOUT)
32
+ update_loglevel
33
+
34
+ start_drb
35
+ run_em
36
+ end
37
+
38
+ def reload_script
39
+ @@medic.reset_script
40
+ end
41
+
42
+ def update_loglevel
43
+ @@logger.level = @@options[:debug] ? Logger::DEBUG : Logger::INFO
44
+ end
45
+
46
+ def update_interval
47
+ interval = @@options.fetch(:interval)
48
+ @@timer.interval = interval
49
+ end
50
+
51
+ def remove_socket
52
+ socket = @@options.fetch(:socket)
53
+ FileUtils.rm_f(socket)
54
+ end
55
+
56
+ private
57
+ def start_drb
58
+ socket = @@options.fetch(:socket)
59
+ FileUtils.rm_f(socket)
60
+ DRb.start_service("drbunix:#{socket}", @@controller)
61
+ File.chmod(0700, socket)
62
+ end
63
+
64
+ def run_em
65
+ addr = @@options.fetch(:addr)
66
+ port = @@options.fetch(:port)
67
+ interval = @@options.fetch(:interval)
68
+
69
+ EM.epoll
70
+ EM.threadpool_size = @@options[:threads] if @@options[:threads]
71
+
72
+ EM.run {
73
+ EM.start_server(addr, port, Healthaid::HttpServer, self)
74
+
75
+ @@timer = EM::PeriodicTimer.new(interval) do
76
+ @@medic.run if @@status.enabled?
77
+ end
78
+ }
79
+ end
80
+ end # self
81
+ end # Server
82
+ end # Healthaid
83
+
84
+ # extend RExec
85
+ module RExec
86
+ module Daemon
87
+ class Base
88
+ def self.daemon_name; APP_NAME; end
89
+ end # Base
90
+
91
+ module Controller
92
+ class << self
93
+ alias stop_orig stop
94
+
95
+ def stop(daemon)
96
+ Healthaid::Server.remove_socket
97
+ stop_orig(daemon)
98
+ end
99
+ end # self
100
+ end # Controller
101
+ end # Daemon
102
+ end # RExec
@@ -0,0 +1,48 @@
1
+ module Healthaid
2
+ class Status
3
+ def initialize(server)
4
+ @server = server
5
+ @health = true
6
+ @enabled = true
7
+
8
+ @healthy_count = 0
9
+ @unhealthy_count = 0
10
+ end
11
+
12
+ def add_healthy
13
+ prev_health = @health
14
+
15
+ if @health = ((@unhealthy_count = 0; @healthy_count += 1) >= @server.options.fetch(:healthy))
16
+ @server.logger.info('service is healthy') if @health != prev_health
17
+ end
18
+ end
19
+
20
+ def add_unhealthy
21
+ prev_health = @health
22
+
23
+ unless @health = !((@healthy_count = 0; @unhealthy_count += 1) >= @server.options.fetch(:unhealthy))
24
+ @server.logger.info('service is unhealthy') if @health != prev_health
25
+ end
26
+ end
27
+
28
+ def healthy?
29
+ @health
30
+ end
31
+
32
+ def enable
33
+ @enabled = true
34
+ end
35
+
36
+ def disable
37
+ @enabled = false
38
+ end
39
+
40
+ def enabled?
41
+ @enabled
42
+ end
43
+
44
+ def available?
45
+ enabled? and healthy?
46
+ end
47
+ end # Healthaid
48
+ end # Status
@@ -0,0 +1,6 @@
1
+ module Healthaid
2
+ VERSION = "0.0.1"
3
+ end
4
+
5
+ Version = Healthaid::VERSION
6
+ APP_NAME = Healthaid.to_s.downcase
metadata ADDED
@@ -0,0 +1,194 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: healthaid
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Genki Sugawara
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-09-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: mysql2
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rexec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 1.6.0
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 1.6.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: eventmachine
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 1.0.3
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 1.0.3
94
+ - !ruby/object:Gem::Dependency
95
+ name: eventmachine_httpserver
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 0.2.1
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.2.1
110
+ - !ruby/object:Gem::Dependency
111
+ name: em-http-request
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 1.1.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 1.1.0
126
+ - !ruby/object:Gem::Dependency
127
+ name: json
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ description: Healthaid is a daemon that monitors the health status of the service.
143
+ email:
144
+ - sugawara@cookpad.com
145
+ executables:
146
+ - healthaid
147
+ - healthaidctl
148
+ extensions: []
149
+ extra_rdoc_files: []
150
+ files:
151
+ - .gitignore
152
+ - Gemfile
153
+ - LICENSE.txt
154
+ - README.md
155
+ - Rakefile
156
+ - bin/healthaid
157
+ - bin/healthaidctl
158
+ - healthaid.gemspec
159
+ - lib/healthaid.rb
160
+ - lib/healthaid/controller.rb
161
+ - lib/healthaid/http-server.rb
162
+ - lib/healthaid/medic.rb
163
+ - lib/healthaid/plugin/http.rb
164
+ - lib/healthaid/plugin/mysql.rb
165
+ - lib/healthaid/plugin/shell.rb
166
+ - lib/healthaid/server.rb
167
+ - lib/healthaid/status.rb
168
+ - lib/healthaid/version.rb
169
+ homepage: https://bitbucket.org/winebarrel/healthaid
170
+ licenses:
171
+ - MIT
172
+ post_install_message:
173
+ rdoc_options: []
174
+ require_paths:
175
+ - lib
176
+ required_ruby_version: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ required_rubygems_version: !ruby/object:Gem::Requirement
183
+ none: false
184
+ requirements:
185
+ - - ! '>='
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ requirements: []
189
+ rubyforge_project:
190
+ rubygems_version: 1.8.23
191
+ signing_key:
192
+ specification_version: 3
193
+ summary: Healthaid is a daemon that monitors the health status of the service.
194
+ test_files: []