haproxy_manager 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rvmrc +1 -1
- data/Readme.md +17 -2
- data/haproxy_manager.gemspec +1 -4
- data/lib/haproxy_manager/version.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +15 -47
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5870f60b49d887903627ec5ba8558319116b1241
|
4
|
+
data.tar.gz: 8a485093437657fc7dbe971ab3b9079ff6d20461
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c2f09783f331cb340f18effd0131b17944943d89ef7822aebd8fddc3a23a84452ac1d76d66e02bc82ebaa56eb4650d7840fd9099b1d74976902f599a2a8d1d6d
|
7
|
+
data.tar.gz: d30d086f8495b290242ad585c97030b31bb304577dcdea0c27e0369bebfbd5d5edf66ab6996dfcb22b9a45ee8beae125198ddf5f8f5e486754a4f5d67b0c8e4c
|
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm ruby-
|
1
|
+
rvm ruby-2.0.0-p247@Haproxy_man --create
|
data/Readme.md
CHANGED
@@ -27,9 +27,10 @@ Installation
|
|
27
27
|
require "haproxy_manager"
|
28
28
|
|
29
29
|
# Gemfile in Rails app
|
30
|
+
|
30
31
|
gem "haproxy_manger", :require => false
|
31
32
|
|
32
|
-
|
33
|
+
Add the following where approporiate(eg. deploy.rb)
|
33
34
|
require "haproxy_manager"
|
34
35
|
|
35
36
|
API
|
@@ -58,8 +59,22 @@ haproxy.weight("preprod-app", "foo-farm") # Returns the current weights setting.
|
|
58
59
|
|
59
60
|
|
60
61
|
haproxy.info # provides information about the haproxy setup. The following is how it looks like. Most fields are self describing.
|
61
|
-
{"Name" => "HAProxy", "Version" => "1.5-dev11", "Release_date" => "2012/06/04", "Nbproc" => "1", "Process_num" => "1", "Pid" => "4084", "Uptime" => "58d 3h50m53s", "Uptime_sec" => "5025053", "Memmax_MB" => "0", "Ulimit-n" => "40029", "Maxsock" => "40029", "Maxconn" => "20000", "Hard_maxconn => "20000", "Maxpipes" => "0", "CurrConns" => "0", "PipesUsed" => "0", "PipesFree" => " 0", "ConnRate" => " 0", "ConnRateLimit" => " 0", "MaxConnRate" => " 69", "Tasks" => " 10", "Run_queue" => " 1", "Idle_pct" => "100", "node" => " The server name", "description" => "Our Awesome Load balancer"}
|
62
|
+
{"Name" => "HAProxy", "Version" => "1.5-dev11", "Release_date" => "2012/06/04", "Nbproc" => "1", "Process_num" => "1", "Pid" => "4084", "Uptime" => "58d 3h50m53s", "Uptime_sec" => "5025053", "Memmax_MB" => "0", "Ulimit-n" => "40029", "Maxsock" => "40029", "Maxconn" => "20000", "Hard_maxconn" => "20000", "Maxpipes" => "0", "CurrConns" => "0", "PipesUsed" => "0", "PipesFree" => " 0", "ConnRate" => " 0", "ConnRateLimit" => " 0", "MaxConnRate" => " 69", "Tasks" => " 10", "Run_queue" => " 1", "Idle_pct" => "100", "node" => " The server name", "description" => "Our Awesome Load balancer"}
|
62
63
|
|
63
64
|
haproxy.reset_counters # Clears HAProxy counters. Except Global counters
|
64
65
|
haproxy.reset_counters(:all) # Clears All HAProxy counters. This is the equivalent of a restart
|
66
|
+
|
67
|
+
haproxy.stats # Retrives the HAProxy stats from the server. The result looks something like this.
|
68
|
+
|
69
|
+
{"foo-farm"=>
|
70
|
+
{"FRONTEND"=>{"qcur"=>"", "qmax"=>"", "scur"=>"0", "smax"=>"150", "slim"=>"2000", "stot"=>"165893", "bin"=>"38619996", "bout"=>"3233457381", "dreq"=>"0", "dresp"=>"0", "ereq"=>"6504", "econ"=>"", "eresp"=>"", "wretr"=>"", "wredis"=>"", "status"=>"OPEN", "weight"=>"", "act"=>"", "bck"=>"", "chkfail"=>"", "chkdown"=>"", "lastchg"=>"", "downtime"=>"", "qlimit"=>"", "pid"=>"1", "iid"=>"1", "sid"=>"0", "throttle"=>"", "lbtot"=>"", "tracked"=>"", "type"=>"0", "rate"=>"0", "rate_lim"=>"0", "rate_max"=>"69", "check_status"=>"", "check_code"=>"", "check_duration"=>"", "hrsp_1xx"=>"0", "hrsp_2xx"=>"136147", "hrsp_3xx"=>"2128", "hrsp_4xx"=>"6654", "hrsp_5xx"=>"20955", "hrsp_other"=>"9", "hanafail"=>"", "req_rate"=>"0", "req_rate_max"=>"144", "req_tot"=>"165893", "cli_abrt"=>nil, "srv_abrt"=>nil},
|
71
|
+
|
72
|
+
"preprod-app"=>{"qcur"=>"0", "qmax"=>"9", "scur"=>"0", "smax"=>"60", "slim"=>"60", "stot"=>"139066", "bin"=>"34839081", "bout"=>"3222850212", "dreq"=>"", "dresp"=>"0", "ereq"=>"", "econ"=>"3", "eresp"=>"725", "wretr"=>"0", "wredis"=>"0", "status"=>"UP", "weight"=>"10", "act"=>"1", "bck"=>"0", "chkfail"=>"583", "chkdown"=>"148", "lastchg"=>"10893", "downtime"=>"257935", "qlimit"=>"", "pid"=>"1", "iid"=>"1", "sid"=>"1", "throttle"=>"", "lbtot"=>"114847", "tracked"=>"", "type"=>"2", "rate"=>"0", "rate_lim"=>"", "rate_max"=>"88", "check_status"=>"L7OK", "check_code"=>"200", "check_duration"=>"150", "hrsp_1xx"=>"0", "hrsp_2xx"=>"135827", "hrsp_3xx"=>"2128", "hrsp_4xx"=>"147", "hrsp_5xx"=>"230", "hrsp_other"=>"0", "hanafail"=>"0", "req_rate"=>"", "req_rate_max"=>"", "req_tot"=>"", "cli_abrt"=>"20", "srv_abrt"=>"11"},
|
73
|
+
|
74
|
+
"preprod-bg"=>{"qcur"=>"0", "qmax"=>"0", "scur"=>"0", "smax"=>"3", "slim"=>"30", "stot"=>"31", "bin"=>"14333", "bout"=>"380028", "dreq"=>"", "dresp"=>"0", "ereq"=>"", "econ"=>"0", "eresp"=>"9", "wretr"=>"4", "wredis"=>"2", "status"=>"DOWN", "weight"=>"5", "act"=>"1", "bck"=>"0", "chkfail"=>"4", "chkdown"=>"10", "lastchg"=>"2538799", "downtime"=>"4603702", "qlimit"=>"", "pid"=>"1", "iid"=>"1", "sid"=>"2", "throttle"=>"", "lbtot"=>"6", "tracked"=>"", "type"=>"2", "rate"=>"0", "rate_lim"=>"", "rate_max"=>"2", "check_status"=>"L4CON", "check_code"=>"", "check_duration"=>"0", "hrsp_1xx"=>"0", "hrsp_2xx"=>"16", "hrsp_3xx"=>"0", "hrsp_4xx"=>"0", "hrsp_5xx"=>"0", "hrsp_other"=>"0", "hanafail"=>"0", "req_rate"=>"", "req_rate_max"=>"", "req_tot"=>"", "cli_abrt"=>"1", "srv_abrt"=>"0"}, "preprod-test"=>{"qcur"=>"0", "qmax"=>"0", "scur"=>"0", "smax"=>"0", "slim"=>"30", "stot"=>"0", "bin"=>"0", "bout"=>"0", "dreq"=>"", "dresp"=>"0", "ereq"=>"", "econ"=>"0", "eresp"=>"0", "wretr"=>"0", "wredis"=>"0", "status"=>"DOWN", "weight"=>"5", "act"=>"1", "bck"=>"0", "chkfail"=>"0", "chkdown"=>"1", "lastchg"=>"5102839", "downtime"=>"5102839", "qlimit"=>"", "pid"=>"1", "iid"=>"1", "sid"=>"3", "throttle"=>"", "lbtot"=>"0", "tracked"=>"", "type"=>"2", "rate"=>"0", "rate_lim"=>"", "rate_max"=>"0", "check_status"=>"L4CON", "check_code"=>"", "check_duration"=>"0", "hrsp_1xx"=>"0", "hrsp_2xx"=>"0", "hrsp_3xx"=>"0", "hrsp_4xx"=>"0", "hrsp_5xx"=>"0", "hrsp_other"=>"0", "hanafail"=>"0", "req_rate"=>"", "req_rate_max"=>"", "req_tot"=>"", "cli_abrt"=>"0", "srv_abrt"=>"0"},
|
75
|
+
|
76
|
+
"BACKEND"=>{"qcur"=>"0", "qmax"=>"84", "scur"=>"0", "smax"=>"150", "slim"=>"200", "stot"=>"159082", "bin"=>"38619996", "bout"=>"3233457381", "dreq"=>"0", "dresp"=>"0", "ereq"=>"", "econ"=>"19991", "eresp"=>"734", "wretr"=>"4", "wredis"=>"2", "status"=>"UP", "weight"=>"10", "act"=>"1", "bck"=>"0", "chkfail"=>"", "chkdown"=>"148", "lastchg"=>"10893", "downtime"=>"300268", "qlimit"=>"", "pid"=>"1", "iid"=>"1", "sid"=>"0", "throttle"=>"", "lbtot"=>"114853", "tracked"=>"", "type"=>"1", "rate"=>"0", "rate_lim"=>"", "rate_max"=>"144", "check_status"=>"", "check_code"=>"", "check_duration"=>"", "hrsp_1xx"=>"0", "hrsp_2xx"=>"135843", "hrsp_3xx"=>"2128", "hrsp_4xx"=>"147", "hrsp_5xx"=>"20955", "hrsp_other"=>"9", "hanafail"=>"", "req_rate"=>"", "req_rate_max"=>"", "req_tot"=>"", "cli_abrt"=>"21", "srv_abrt"=>"11"}}}
|
77
|
+
|
78
|
+
|
79
|
+
|
65
80
|
```
|
data/haproxy_manager.gemspec
CHANGED
@@ -14,14 +14,11 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.files = `git ls-files`.split("\n")
|
15
15
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
16
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
-
s.default_executable = "couchup"
|
18
17
|
|
19
18
|
s.require_paths = ["lib"]
|
20
19
|
|
21
|
-
s.add_dependency 'couchrest'
|
22
|
-
|
23
20
|
s.add_development_dependency 'rspec'
|
24
21
|
s.add_development_dependency 'rake'
|
25
22
|
s.add_development_dependency 'mocha'
|
26
23
|
s.add_development_dependency 'bundler'
|
27
|
-
end
|
24
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module HAProxyManager
|
2
|
-
VERSION = "0.1.
|
3
|
-
end
|
2
|
+
VERSION = "0.1.3"
|
3
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haproxy_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Sreekanth(sreeix)
|
@@ -10,86 +9,62 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2013-10-31 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: couchrest
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ! '>='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '0'
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ! '>='
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '0'
|
31
14
|
- !ruby/object:Gem::Dependency
|
32
15
|
name: rspec
|
33
16
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
17
|
requirements:
|
36
|
-
- -
|
18
|
+
- - '>='
|
37
19
|
- !ruby/object:Gem::Version
|
38
20
|
version: '0'
|
39
21
|
type: :development
|
40
22
|
prerelease: false
|
41
23
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
24
|
requirements:
|
44
|
-
- -
|
25
|
+
- - '>='
|
45
26
|
- !ruby/object:Gem::Version
|
46
27
|
version: '0'
|
47
28
|
- !ruby/object:Gem::Dependency
|
48
29
|
name: rake
|
49
30
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
31
|
requirements:
|
52
|
-
- -
|
32
|
+
- - '>='
|
53
33
|
- !ruby/object:Gem::Version
|
54
34
|
version: '0'
|
55
35
|
type: :development
|
56
36
|
prerelease: false
|
57
37
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
38
|
requirements:
|
60
|
-
- -
|
39
|
+
- - '>='
|
61
40
|
- !ruby/object:Gem::Version
|
62
41
|
version: '0'
|
63
42
|
- !ruby/object:Gem::Dependency
|
64
43
|
name: mocha
|
65
44
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
45
|
requirements:
|
68
|
-
- -
|
46
|
+
- - '>='
|
69
47
|
- !ruby/object:Gem::Version
|
70
48
|
version: '0'
|
71
49
|
type: :development
|
72
50
|
prerelease: false
|
73
51
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
52
|
requirements:
|
76
|
-
- -
|
53
|
+
- - '>='
|
77
54
|
- !ruby/object:Gem::Version
|
78
55
|
version: '0'
|
79
56
|
- !ruby/object:Gem::Dependency
|
80
57
|
name: bundler
|
81
58
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
59
|
requirements:
|
84
|
-
- -
|
60
|
+
- - '>='
|
85
61
|
- !ruby/object:Gem::Version
|
86
62
|
version: '0'
|
87
63
|
type: :development
|
88
64
|
prerelease: false
|
89
65
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
66
|
requirements:
|
92
|
-
- -
|
67
|
+
- - '>='
|
93
68
|
- !ruby/object:Gem::Version
|
94
69
|
version: '0'
|
95
70
|
description: Manages haproxy farms and servers
|
@@ -114,33 +89,26 @@ files:
|
|
114
89
|
- spec/spec_helper.rb
|
115
90
|
homepage: https://github.com/althea/haproxy-manager
|
116
91
|
licenses: []
|
92
|
+
metadata: {}
|
117
93
|
post_install_message:
|
118
94
|
rdoc_options: []
|
119
95
|
require_paths:
|
120
96
|
- lib
|
121
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
98
|
requirements:
|
124
|
-
- -
|
99
|
+
- - '>='
|
125
100
|
- !ruby/object:Gem::Version
|
126
101
|
version: '0'
|
127
|
-
segments:
|
128
|
-
- 0
|
129
|
-
hash: -845805154420122450
|
130
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
103
|
requirements:
|
133
|
-
- -
|
104
|
+
- - '>='
|
134
105
|
- !ruby/object:Gem::Version
|
135
106
|
version: '0'
|
136
|
-
segments:
|
137
|
-
- 0
|
138
|
-
hash: -845805154420122450
|
139
107
|
requirements: []
|
140
108
|
rubyforge_project: haproxy_manager
|
141
|
-
rubygems_version:
|
109
|
+
rubygems_version: 2.0.6
|
142
110
|
signing_key:
|
143
|
-
specification_version:
|
111
|
+
specification_version: 4
|
144
112
|
summary: HAproxy manager for controlling haproxy
|
145
113
|
test_files:
|
146
114
|
- spec/instance_spec.rb
|