fluent-plugin-syslog-gobi-tls 2.1.30 → 2.1.32
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 +4 -4
- data/fluent-plugin-syslog-tls.gemspec +1 -1
- data/lib/syslog_tls/ssl_transport.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fd87297c4b2f5b4ba6ccaab5efa4442257e068d493073d5e667c967d682e6be
|
4
|
+
data.tar.gz: a7cd26a3634f33886a41836b6a306a5ffaf765b1420663a6327181819253fe56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7ac4a730b7b31ccdb937194be77852e571a705981901ddf649e3b6f21f9aff13852f3e86d1013e9c8d8d456faa1bf3f91967d0e9b4f5c709763509f02f7bb2d
|
7
|
+
data.tar.gz: 076b32956c407c81455f732ccada94dd4bf0dab4f09bac062310e5fdf194ffc6330b6bc7d131ab1474f459d571d9d1491906d9864fb001501140fceabd0366f4
|
@@ -19,7 +19,7 @@ require 'syslog_tls/version'
|
|
19
19
|
|
20
20
|
Gem::Specification.new do |s|
|
21
21
|
s.name = 'fluent-plugin-syslog-gobi-tls'
|
22
|
-
s.version = '2.1.
|
22
|
+
s.version = '2.1.32'
|
23
23
|
s.authors = ['thomas morgan']
|
24
24
|
s.email = ['tm@iprog.com']
|
25
25
|
s.summary = %q{Fluent Syslog TLS output plugin}
|
@@ -31,6 +31,7 @@ module SyslogTls
|
|
31
31
|
attr_writer :retries
|
32
32
|
|
33
33
|
def initialize(host, port, idle_timeout: nil, ca_cert: 'system', client_cert: nil, client_key: nil, verify_cert_name: true, ssl_version: :TLS1_2, max_retries: 1)
|
34
|
+
pp "initialize SSLTransport"
|
34
35
|
@host = host
|
35
36
|
@port = port
|
36
37
|
@idle_timeout = idle_timeout
|
@@ -44,18 +45,24 @@ module SyslogTls
|
|
44
45
|
end
|
45
46
|
|
46
47
|
def connect
|
48
|
+
timwnow = Time.now
|
49
|
+
pp "initialize SSLTransport.connect"+ timwnow.to_s
|
47
50
|
@socket = get_ssl_connection
|
48
51
|
begin
|
49
52
|
begin
|
50
53
|
@socket.connect_nonblock
|
51
54
|
rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable
|
55
|
+
pp "initialize SSLTransport Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable"
|
52
56
|
select_with_timeout(@socket, :connect_read) && retry
|
53
57
|
rescue IO::WaitWritable
|
58
|
+
pp "initialize SSLTransport IO::WaitWritable"
|
54
59
|
select_with_timeout(@socket, :connect_write) && retry
|
55
60
|
end
|
56
61
|
rescue Errno::ETIMEDOUT
|
62
|
+
pp "initialize SSLTransport Errno::ETIMEDOUT"
|
57
63
|
raise 'Socket timeout during connect'
|
58
64
|
end
|
65
|
+
pp "initialize SSLTransport last_write"
|
59
66
|
@last_write = Time.now if idle_timeout
|
60
67
|
end
|
61
68
|
|
@@ -125,7 +132,9 @@ module SyslogTls
|
|
125
132
|
|
126
133
|
# Allow to retry on failed writes
|
127
134
|
def write(s)
|
135
|
+
pp "initialize SSLTransport.write"
|
128
136
|
if idle_timeout
|
137
|
+
pp "initialize SSLTransport.write idle_timeout" + idle_timeout.to_s
|
129
138
|
if (t=Time.now) > @last_write + idle_timeout
|
130
139
|
@socket.close rescue nil
|
131
140
|
connect
|
@@ -134,6 +143,7 @@ module SyslogTls
|
|
134
143
|
end
|
135
144
|
end
|
136
145
|
begin
|
146
|
+
pp "initialize SSLTransport.write !idle_timeout"
|
137
147
|
retry_id ||= 0
|
138
148
|
do_write(s)
|
139
149
|
rescue => e
|
@@ -167,7 +177,9 @@ module SyslogTls
|
|
167
177
|
end
|
168
178
|
|
169
179
|
def select_with_timeout(tcp, type)
|
180
|
+
|
170
181
|
host_ip_port = host + ":" + port.to_s
|
182
|
+
pp "1: initialize SSLTransport.select_with_timeout :: " + host_ip_port
|
171
183
|
|
172
184
|
case type
|
173
185
|
when :connect_read
|
@@ -181,14 +193,19 @@ module SyslogTls
|
|
181
193
|
else
|
182
194
|
raise "Unknown select type #{type}"
|
183
195
|
end
|
196
|
+
pp "2: initialize SSLTransport.select_with_timeout :: " + host_ip_port
|
184
197
|
if can_write(host_ip_port) == 1
|
198
|
+
pp "3: initialize SSLTransport.select_with_timeout :: " + host_ip_port
|
185
199
|
if IO.select(*args)
|
200
|
+
pp "4: initialize SSLTransport.select_with_timeout :: " + host_ip_port
|
186
201
|
reset_tries(host_ip_port)
|
187
202
|
else
|
188
203
|
increase_retry(host_ip_port)
|
204
|
+
pp "initialize SSLTransport.select_with_timeout :: Socket timeout"
|
189
205
|
raise("Socket timeout during #{type}")
|
190
206
|
end
|
191
207
|
else
|
208
|
+
pp "initialize SSLTransport.select_with_timeout :: Failed to write"
|
192
209
|
raise("Failed to write #{type}")
|
193
210
|
end
|
194
211
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-syslog-gobi-tls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thomas morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|