litmus_paper 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Dockerfile +10 -7
- data/README.md +5 -2
- data/lib/litmus_paper/agent_check_handler.rb +4 -0
- data/lib/litmus_paper/agent_check_server.rb +29 -36
- data/lib/litmus_paper/cli/agent_check.rb +42 -20
- data/lib/litmus_paper/metric/tcp_socket_utilization.rb +1 -1
- data/lib/litmus_paper/metric/unix_socket_utilization.rb +1 -1
- data/lib/litmus_paper/multi_port_agent_server.rb +23 -0
- data/lib/litmus_paper/single_port_agent_server.rb +29 -0
- data/lib/litmus_paper/version.rb +1 -1
- data/spec/litmus_paper/{agent_check_server_spec.rb → multi_port_agent_server_spec.rb} +2 -2
- data/spec/litmus_paper/single_port_agent_server_spec.rb +84 -0
- data/spec/ssl/server.crt +30 -16
- data/spec/ssl/server.key +52 -15
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e1c48dbe7a39abd27341207056934ec3e486a07c6fa510b77d8dfe18d98e1388
|
4
|
+
data.tar.gz: 1c2076dc0c76f6174a69c2e3a93a1e6d89e45d66646f109088ab9f02151db3b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab98209fec2123b0c77a30da44e029d5e2f86bd5f0fb8e8fdbde74b1ab3f5d1f19e568655d184bec05e77b8228324fca8acae55769baa1d485139b86b05b8330
|
7
|
+
data.tar.gz: 7926a582ac8b8aefb4f6b18d381b315ae9bfa01b8c921a87db83a896ca2b803fa59c11169b7548d37c619e04a92ef42c3f30012672951c1849ffaacc2b5b67f2
|
data/Dockerfile
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
FROM debian:
|
1
|
+
FROM debian:bookworm-slim
|
2
2
|
|
3
3
|
EXPOSE 9293/TCP
|
4
4
|
|
5
5
|
ENV APP_USER litmus_paper
|
6
|
+
ENV SSL_CERT_FILE=/home/${APP_USER}/combined_cacerts.pem
|
6
7
|
ENV LANG C.UTF-8
|
7
8
|
ENV LC_ALL C.UTF-8
|
8
9
|
|
@@ -19,19 +20,22 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
19
20
|
|
20
21
|
# Create non-root user
|
21
22
|
RUN addgroup --gid 1000 --system $APP_USER && \
|
22
|
-
adduser --uid 1000 --ingroup $APP_USER --system $APP_USER
|
23
|
+
adduser --disabled-password --uid 1000 --ingroup $APP_USER --system $APP_USER
|
23
24
|
|
24
25
|
ENV GEM_HOME /usr/local/bundle
|
25
26
|
ENV BUNDLE_APP_CONFIG $GEM_HOME
|
26
27
|
ENV PATH $GEM_HOME/bin:$PATH
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
29
|
+
COPY --chown=$APP_USER:$APP_USER litmus_paper.gemspec /home/$APP_USER/
|
30
|
+
COPY --chown=$APP_USER:$APP_USER lib/litmus_paper/version.rb /home/$APP_USER/lib/litmus_paper/version.rb
|
31
|
+
COPY --chown=$APP_USER:$APP_USER Gemfile* /home/$APP_USER/
|
32
|
+
COPY --chown=$APP_USER:$APP_USER . /home/$APP_USER
|
31
33
|
|
32
34
|
WORKDIR /home/$APP_USER
|
33
35
|
|
34
|
-
|
36
|
+
COPY combined_cacerts.pem /home/${APP_USER}/combined_cacerts.pem
|
37
|
+
RUN git config --global --add safe.directory /home/litmus_paper
|
38
|
+
RUN bundle config --global silence_root_warning true frozen 1 && \
|
35
39
|
bundle install \
|
36
40
|
-j2 \
|
37
41
|
--retry 3 \
|
@@ -40,7 +44,6 @@ RUN bundle config --global frozen 1 && \
|
|
40
44
|
&& find /usr/local/bundle/gems/ -name "*.c" -delete \
|
41
45
|
&& find /usr/local/bundle/gems/ -name "*.o" -delete
|
42
46
|
|
43
|
-
ADD . /home/$APP_USER
|
44
47
|
RUN ln -sf /home/$APP_USER/docker/litmus.conf /etc/litmus.conf \
|
45
48
|
&& ln -sf /home/$APP_USER/docker/litmus_unicorn.rb /etc/litmus_unicorn.rb
|
46
49
|
RUN gem build litmus_paper.gemspec && gem install litmus_paper*.gem
|
data/README.md
CHANGED
@@ -203,15 +203,18 @@ There are no additional configuration files for the agent check, since all optio
|
|
203
203
|
|
204
204
|
```
|
205
205
|
Usage: litmus-agent-check [options]
|
206
|
-
-s, --service SERVICE:PORT,... agent-check service to port mappings
|
206
|
+
-s, --service SERVICE:PORT,... agent-check service to port mappings (multi-port mode)
|
207
207
|
-c, --config CONFIG Path to litmus paper config file
|
208
208
|
-p, --pid-file PID_FILE Where to write the pid
|
209
|
+
-P, --port PORT Port for agent check. Can be used with HAProxy 1.7+ with agent-send directive (single-port mode)
|
209
210
|
-w, --workers WORKERS Number of worker processes
|
210
211
|
-D, --daemonize Daemonize the process
|
211
212
|
-h, --help Help text
|
212
213
|
```
|
213
214
|
|
214
|
-
|
215
|
+
In single-port mode, the `-P` or `--port` argument specifies the port that the server will expose the data for all services litmus is configured for on `port` in HAProxy agent check format. This can be used on HAProxy 1.7+ with the `agent-send` directive to specify a backend name to be sent by HAProxy and have litmus paper do the lookup. For example, `agent-send "my_service\n"`.
|
216
|
+
|
217
|
+
In multi-port mode, the service:port argument means that the server will expose the data from the litmus check for `service` on `port` in HAProxy agent check format. For example, if you wanted to serve status information about `myapp` on port `8080`, and already had a service config for it, you'd pass `-s myapp:8080`.
|
215
218
|
|
216
219
|
On the HAProxy server, add `agent-check agent-port 8080 agent-inter <seconds>s` to the config line for each server listed for that backend. This tells HAProxy to query port 8080 on the backend every `<seconds>` seconds for health information. See the [HAProxy agent check documentation](https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-agent-check) for more details.
|
217
220
|
|
@@ -5,42 +5,28 @@ require 'socket'
|
|
5
5
|
require 'litmus_paper/agent_check_handler'
|
6
6
|
|
7
7
|
module LitmusPaper
|
8
|
-
|
9
|
-
CRLF = "\r\n"
|
8
|
+
module AgentCheckServer
|
9
|
+
CRLF = "\r\n".freeze
|
10
10
|
|
11
|
-
|
11
|
+
attr_reader :control_sockets, :pid_file, :workers
|
12
|
+
|
13
|
+
def initialize(litmus_paper_config, daemonize, pid_file, workers)
|
12
14
|
LitmusPaper.configure(litmus_paper_config)
|
13
|
-
@services = services
|
14
|
-
@workers = workers
|
15
|
-
@pid_file = pid_file
|
16
15
|
@daemonize = daemonize
|
17
|
-
@
|
18
|
-
|
19
|
-
|
16
|
+
@pid_file = pid_file
|
17
|
+
@workers = workers
|
18
|
+
|
20
19
|
trap(:INT) { exit }
|
21
20
|
trap(:TERM) { exit }
|
22
21
|
end
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
readable, _, _ = IO.select(sockets)
|
32
|
-
readable.each { |r|
|
33
|
-
begin
|
34
|
-
sock, addr = r.accept_nonblock
|
35
|
-
_, remote_port, _, remote_ip = sock.peeraddr
|
36
|
-
LitmusPaper.logger.debug "Received request from #{remote_ip}:#{remote_port}"
|
37
|
-
service = @services[r.local_address.ip_port]
|
38
|
-
rescue IO::WaitReadable
|
39
|
-
next
|
40
|
-
end
|
41
|
-
yield sock, service
|
42
|
-
}
|
43
|
-
}
|
23
|
+
def daemonize?
|
24
|
+
!!@daemonize
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
def service_for_socket(socket)
|
29
|
+
raise "Consumers must implemented service_for_socket(socket)"
|
44
30
|
end
|
45
31
|
|
46
32
|
def respond(sock, message)
|
@@ -55,13 +41,13 @@ module LitmusPaper
|
|
55
41
|
end
|
56
42
|
|
57
43
|
def run
|
58
|
-
if
|
44
|
+
if daemonize?
|
59
45
|
Process.daemon
|
60
46
|
end
|
61
|
-
write_pid(
|
47
|
+
write_pid(pid_file)
|
62
48
|
child_pids = []
|
63
49
|
|
64
|
-
|
50
|
+
workers.times do
|
65
51
|
child_pids << spawn_child
|
66
52
|
end
|
67
53
|
|
@@ -72,7 +58,7 @@ module LitmusPaper
|
|
72
58
|
rescue Errno::ESRCH
|
73
59
|
end
|
74
60
|
end
|
75
|
-
File.delete(
|
61
|
+
File.delete(pid_file) if File.exists?(pid_file)
|
76
62
|
exit
|
77
63
|
}
|
78
64
|
|
@@ -89,9 +75,16 @@ module LitmusPaper
|
|
89
75
|
|
90
76
|
def spawn_child
|
91
77
|
fork do
|
92
|
-
accept_loop(
|
93
|
-
|
94
|
-
|
78
|
+
Socket.accept_loop(control_sockets) do |sock, addr|
|
79
|
+
_, remote_port, _, remote_ip = sock.peeraddr(:numeric)
|
80
|
+
|
81
|
+
begin
|
82
|
+
service = service_for_socket(sock)
|
83
|
+
respond(sock, AgentCheckHandler.handle(service))
|
84
|
+
sock.close
|
85
|
+
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::ENOTCONN
|
86
|
+
LitmusPaper.logger.debug "Received request from #{remote_ip}:#{remote_port}, but client hung up."
|
87
|
+
end
|
95
88
|
end
|
96
89
|
end
|
97
90
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'optparse'
|
2
|
-
require 'litmus_paper/
|
2
|
+
require 'litmus_paper/single_port_agent_server'
|
3
|
+
require 'litmus_paper/multi_port_agent_server'
|
3
4
|
|
4
5
|
module LitmusPaper
|
5
6
|
module CLI
|
@@ -9,7 +10,7 @@ module LitmusPaper
|
|
9
10
|
options = {}
|
10
11
|
options[:pid_file] = '/tmp/litmus-agent-check.pid'
|
11
12
|
optparser = OptionParser.new do |opts|
|
12
|
-
opts.on("-s", "--service SERVICE:PORT,...", Array, "agent-check service to port mappings") do |s|
|
13
|
+
opts.on("-s", "--service SERVICE:PORT,...", Array, "agent-check service to port mappings (multi-port mode)") do |s|
|
13
14
|
options[:services] = s
|
14
15
|
end
|
15
16
|
opts.on("-c", "--config CONFIG", "Path to litmus paper config file") do |c|
|
@@ -18,6 +19,9 @@ module LitmusPaper
|
|
18
19
|
opts.on("-p", "--pid-file PID_FILE", String, "Where to write the pid") do |p|
|
19
20
|
options[:pid_file] = p
|
20
21
|
end
|
22
|
+
opts.on("-P", "--port PORT", Integer, "Port for agent check. Can be used with HAProxy 1.7+ with agent-send directive (single-port mode)") do |port|
|
23
|
+
options[:port] = port
|
24
|
+
end
|
21
25
|
opts.on("-w", "--workers WORKERS", Integer, "Number of worker processes") do |w|
|
22
26
|
options[:workers] = w
|
23
27
|
end
|
@@ -42,8 +46,12 @@ module LitmusPaper
|
|
42
46
|
exit 0
|
43
47
|
end
|
44
48
|
|
45
|
-
if !options.has_key?(:services)
|
46
|
-
puts "Error: `-s SERVICE:PORT,...` required"
|
49
|
+
if !options.has_key?(:services) && !options.has_key?(:port)
|
50
|
+
puts "Error: `-s SERVICE:PORT,...` or `-P PORT` required"
|
51
|
+
puts optparser
|
52
|
+
exit 1
|
53
|
+
elsif options.has_key?(:services) && options.has_key?(:port)
|
54
|
+
puts "Error: `-s` and `-P` are mutually exclusive and cannot be specified together"
|
47
55
|
puts optparser
|
48
56
|
exit 1
|
49
57
|
end
|
@@ -56,15 +64,17 @@ module LitmusPaper
|
|
56
64
|
exit 1
|
57
65
|
end
|
58
66
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
67
|
+
if options.has_key?(:services)
|
68
|
+
options[:services] = options[:services].reduce({}) do |memo, service|
|
69
|
+
if service.split(':').length == 2
|
70
|
+
service, port = service.split(':')
|
71
|
+
memo[port.to_i] = service
|
72
|
+
memo
|
73
|
+
else
|
74
|
+
puts "Error: Incorrect service port arg `-s SERVICE:PORT,...`"
|
75
|
+
puts optparser
|
76
|
+
exit 1
|
77
|
+
end
|
68
78
|
end
|
69
79
|
end
|
70
80
|
|
@@ -73,13 +83,25 @@ module LitmusPaper
|
|
73
83
|
|
74
84
|
def run(args)
|
75
85
|
options = parse_args(args)
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
86
|
+
|
87
|
+
if options.has_key?(:port)
|
88
|
+
agent_check_server = LitmusPaper::SinglePortAgentServer.new(
|
89
|
+
options[:litmus_paper_config],
|
90
|
+
options[:daemonize],
|
91
|
+
options[:pid_file],
|
92
|
+
options[:port],
|
93
|
+
options[:workers],
|
94
|
+
)
|
95
|
+
else
|
96
|
+
agent_check_server = LitmusPaper::MultiPortAgentServer.new(
|
97
|
+
options[:litmus_paper_config],
|
98
|
+
options[:daemonize],
|
99
|
+
options[:pid_file],
|
100
|
+
options[:services],
|
101
|
+
options[:workers],
|
102
|
+
)
|
103
|
+
end
|
104
|
+
|
83
105
|
agent_check_server.run
|
84
106
|
end
|
85
107
|
|
@@ -20,7 +20,7 @@ module LitmusPaper
|
|
20
20
|
queued = current_stats[:socket_queued]
|
21
21
|
utilization = current_stats[:socket_utilization]
|
22
22
|
|
23
|
-
"Metric::
|
23
|
+
"Metric::TcpSocketUtilization(weight: #{weight}, maxconn: #{maxconn}, active: #{active}, queued: #{queued}, utilization: #{utilization}, address: #{address})"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -25,7 +25,7 @@ module LitmusPaper
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.const_missing(const_name)
|
28
|
-
super unless const_name == :UnixSocketUtilitization
|
28
|
+
return super unless const_name == :UnixSocketUtilitization
|
29
29
|
warn "`LitmusPaper::Metric::UnixSocketUtilitization` has been deprecated. Use `LitmusPaper::Metric::UnixSocketUtilization` instead."
|
30
30
|
UnixSocketUtilization
|
31
31
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'litmus_paper/agent_check_server'
|
2
|
+
|
3
|
+
module LitmusPaper
|
4
|
+
class MultiPortAgentServer
|
5
|
+
include AgentCheckServer
|
6
|
+
|
7
|
+
attr_reader :services
|
8
|
+
|
9
|
+
def initialize(litmus_paper_config, daemonize, pid_file, services, workers)
|
10
|
+
super(litmus_paper_config, daemonize, pid_file, workers)
|
11
|
+
@services = services
|
12
|
+
@control_sockets = @services.keys.map do |port|
|
13
|
+
TCPServer.new(port)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def service_for_socket(socket)
|
18
|
+
_, remote_port, _, remote_ip = socket.peeraddr(:numeric)
|
19
|
+
LitmusPaper.logger.debug "Received request from #{remote_ip}:#{remote_port}"
|
20
|
+
services[socket.local_address.ip_port]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'litmus_paper/agent_check_server'
|
2
|
+
|
3
|
+
module LitmusPaper
|
4
|
+
class SinglePortAgentServer
|
5
|
+
include AgentCheckServer
|
6
|
+
|
7
|
+
VALID_NAME_REGEX = /\A[A-Za-z0-9_:.-]+\z/.freeze
|
8
|
+
|
9
|
+
def initialize(litmus_paper_config, daemonize, pid_file, port, workers)
|
10
|
+
super(litmus_paper_config, daemonize, pid_file, workers)
|
11
|
+
@control_sockets = [TCPServer.new(port)]
|
12
|
+
end
|
13
|
+
|
14
|
+
def service_for_socket(socket)
|
15
|
+
_, remote_port, _, remote_ip = socket.peeraddr(:numeric)
|
16
|
+
|
17
|
+
msg = socket.gets
|
18
|
+
|
19
|
+
if msg && (m = msg.chomp.match(VALID_NAME_REGEX))
|
20
|
+
backend_name = m[0]
|
21
|
+
LitmusPaper.logger.info "Received request from #{remote_ip}:#{remote_port} for '#{backend_name}'"
|
22
|
+
backend_name
|
23
|
+
else
|
24
|
+
LitmusPaper.logger.error "Received request from #{remote_ip}:#{remote_port}, but backend name could not be read."
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/litmus_paper/version.rb
CHANGED
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'litmus_paper/single_port_agent_server'
|
3
|
+
|
4
|
+
describe LitmusPaper::SinglePortAgentServer do
|
5
|
+
pid = nil
|
6
|
+
|
7
|
+
before :all do
|
8
|
+
if ! Kernel.system("bundle exec litmus-agent-check -P 9191 -c spec/support/test.config -w 10 -D")
|
9
|
+
fail('Unable to start server')
|
10
|
+
end
|
11
|
+
port_open = false
|
12
|
+
while ! port_open do
|
13
|
+
begin
|
14
|
+
TCPSocket.new('127.0.0.1', 9191)
|
15
|
+
rescue StandardError => e
|
16
|
+
sleep 0.1
|
17
|
+
next
|
18
|
+
end
|
19
|
+
port_open = true
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
after :all do
|
24
|
+
Process.kill(:TERM, File.read('/tmp/litmus-agent-check.pid').to_i)
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "The agent-check text protocol" do
|
28
|
+
it "returns the health from a passing test" do
|
29
|
+
TCPSocket.open('127.0.0.1', 9191) do |s|
|
30
|
+
s.puts "passing_test"
|
31
|
+
s.gets.should match(/ready\tup\t\d+%\r\n/)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
it "returns the health from a failing test" do
|
35
|
+
TCPSocket.open('127.0.0.1', 9191) do |s|
|
36
|
+
s.puts "test"
|
37
|
+
s.gets.should match(/down\t0%\r\n/)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
it "returns a failure for a non-existent service" do
|
41
|
+
TCPSocket.open('127.0.0.1', 9191) do |s|
|
42
|
+
s.puts "foo"
|
43
|
+
s.gets.should match(/failed#NOT_FOUND\r\n/)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
it "returns a failure for a bad message" do
|
47
|
+
TCPSocket.open('127.0.0.1', 9191) do |s|
|
48
|
+
s.puts "\n"
|
49
|
+
s.gets.should match(/failed#BAD_INPUT\r\n/)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "server" do
|
55
|
+
it "has the configured number of children running" do
|
56
|
+
pid = File.read('/tmp/litmus-agent-check.pid').to_i
|
57
|
+
children = `ps --no-headers --ppid #{pid}|wc -l`
|
58
|
+
children.strip.to_i == 10
|
59
|
+
end
|
60
|
+
|
61
|
+
it "doesn't crash if a client hangs up" do
|
62
|
+
pid = File.read('/tmp/litmus-agent-check.pid').to_i
|
63
|
+
child_pids = `ps --no-headers --ppid #{pid}|wc -l`
|
64
|
+
original_pids = `pgrep -P #{pid}`.chomp.split("\n")
|
65
|
+
|
66
|
+
TCPSocket.open('127.0.0.1', 9191) do |s|
|
67
|
+
# Do nothing (e.g. haproxy w/o agent-send setup correctly)
|
68
|
+
end
|
69
|
+
|
70
|
+
sleep 0.5
|
71
|
+
|
72
|
+
current_pids = `pgrep -P #{pid}`.chomp.split("\n")
|
73
|
+
current_pids.should eql(original_pids)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "if a child dies you get a new one" do
|
77
|
+
pid = File.read('/tmp/litmus-agent-check.pid').to_i
|
78
|
+
Kernel.system("kill -9 $(ps --no-headers --ppid #{pid} -o pid=|tail -1)")
|
79
|
+
sleep 0.5
|
80
|
+
children = `ps --no-headers --ppid #{pid}|wc -l`
|
81
|
+
children.strip.to_i == 10
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
data/spec/ssl/server.crt
CHANGED
@@ -1,18 +1,32 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
2
|
+
MIIFlTCCA32gAwIBAgIUHWXS1Fa3wXon+C9q6U34gYzJhxcwDQYJKoZIhvcNAQEL
|
3
|
+
BQAwWjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCElsbGlub2lzMRAwDgYDVQQHDAdD
|
4
|
+
aGljYWdvMRIwEAYDVQQKDAlCcmFpbnRyZWUxEjAQBgNVBAMMCTEyNy4wLjAuMTAe
|
5
|
+
Fw0yNDA5MjYyMTA2NDVaFw0zNDA5MjQyMTA2NDVaMFoxCzAJBgNVBAYTAlVTMREw
|
6
|
+
DwYDVQQIDAhJbG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GwjiNYQaKV176BfhPNW8VfemZoVI51xs5LEzQ
|
47
|
+
to5M34Z6lJjo7XEkYSW9kpJ+LQ822zzKn/OtMdt06tMGg1puyYnSbo7LlIyNpuQf
|
48
|
+
e1NdUtl/3AUm/tRjl9rVQvyrLPfeaHGKeUP96RM8Q2NMQzMnb42liVc9cCtFCyET
|
49
|
+
njc/sM9oh6vj9JRL2EFMH2OLAOAezaZIN7LdPz7Ij6P3JRp3KDycYIDIV8g5BBQA
|
50
|
+
QWrVsu6iwPLfk65M8J2lSk9Gj/oOK9vBPRXvgn3D1qWCnnCCsCS7lHadH2u15u31
|
51
|
+
zzAeg1BIeBWTl87fSL/BKR7l3LtFMbU=
|
52
|
+
-----END PRIVATE KEY-----
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: litmus_paper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Braintreeps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -192,7 +192,9 @@ files:
|
|
192
192
|
- lib/litmus_paper/metric/socket_utilization.rb
|
193
193
|
- lib/litmus_paper/metric/tcp_socket_utilization.rb
|
194
194
|
- lib/litmus_paper/metric/unix_socket_utilization.rb
|
195
|
+
- lib/litmus_paper/multi_port_agent_server.rb
|
195
196
|
- lib/litmus_paper/service.rb
|
197
|
+
- lib/litmus_paper/single_port_agent_server.rb
|
196
198
|
- lib/litmus_paper/status_file.rb
|
197
199
|
- lib/litmus_paper/terminal_output.rb
|
198
200
|
- lib/litmus_paper/util.rb
|
@@ -201,7 +203,6 @@ files:
|
|
201
203
|
- litmus_paper.gemspec
|
202
204
|
- release
|
203
205
|
- spec/litmus_paper/agent_check_handler_spec.rb
|
204
|
-
- spec/litmus_paper/agent_check_server_spec.rb
|
205
206
|
- spec/litmus_paper/app_spec.rb
|
206
207
|
- spec/litmus_paper/cache_spec.rb
|
207
208
|
- spec/litmus_paper/cli/admin_spec.rb
|
@@ -220,7 +221,9 @@ files:
|
|
220
221
|
- spec/litmus_paper/metric/script_spec.rb
|
221
222
|
- spec/litmus_paper/metric/tcp_socket_utilization_spec.rb
|
222
223
|
- spec/litmus_paper/metric/unix_socket_utilization_spec.rb
|
224
|
+
- spec/litmus_paper/multi_port_agent_server_spec.rb
|
223
225
|
- spec/litmus_paper/service_spec.rb
|
226
|
+
- spec/litmus_paper/single_port_agent_server_spec.rb
|
224
227
|
- spec/litmus_paper/status_file_spec.rb
|
225
228
|
- spec/litmus_paper_spec.rb
|
226
229
|
- spec/script/https_test_server.rb
|
@@ -266,14 +269,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
269
|
- !ruby/object:Gem::Version
|
267
270
|
version: '0'
|
268
271
|
requirements: []
|
269
|
-
|
270
|
-
rubygems_version: 2.5.2.1
|
272
|
+
rubygems_version: 3.0.9
|
271
273
|
signing_key:
|
272
274
|
specification_version: 4
|
273
275
|
summary: Backend health tester for HA Services, partner project of big_brother
|
274
276
|
test_files:
|
275
277
|
- spec/litmus_paper/agent_check_handler_spec.rb
|
276
|
-
- spec/litmus_paper/agent_check_server_spec.rb
|
277
278
|
- spec/litmus_paper/app_spec.rb
|
278
279
|
- spec/litmus_paper/cache_spec.rb
|
279
280
|
- spec/litmus_paper/cli/admin_spec.rb
|
@@ -292,7 +293,9 @@ test_files:
|
|
292
293
|
- spec/litmus_paper/metric/script_spec.rb
|
293
294
|
- spec/litmus_paper/metric/tcp_socket_utilization_spec.rb
|
294
295
|
- spec/litmus_paper/metric/unix_socket_utilization_spec.rb
|
296
|
+
- spec/litmus_paper/multi_port_agent_server_spec.rb
|
295
297
|
- spec/litmus_paper/service_spec.rb
|
298
|
+
- spec/litmus_paper/single_port_agent_server_spec.rb
|
296
299
|
- spec/litmus_paper/status_file_spec.rb
|
297
300
|
- spec/litmus_paper_spec.rb
|
298
301
|
- spec/script/https_test_server.rb
|