fluent-plugin-ssl-check 2.4.0 → 2.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32576d289dd8aa0e769f4e4aaa975cbc0517d3d25a70506f5ef478572ca7cf89
4
- data.tar.gz: ac1682153f0c68ed33aec0ad1334776425d542369fa0285a6c306dc1892c72e2
3
+ metadata.gz: 33d81d3570762b99a63f68ccc60c5c1f9c2525ec3c4e90be6d3fddfa064a6c58
4
+ data.tar.gz: 875f3e22c7700213604c5dc7ced98dac34d3731377810c904213a699a70403c2
5
5
  SHA512:
6
- metadata.gz: b4702ea39635a4f00dce824ca750a5c9b507a1102234b88b3fe782bd25205c7377a40cde8e51143324af1d1f25ee574542e391b8e99f59e9c3fa1d31b15d95cc
7
- data.tar.gz: e67001eedef2c25b144ef2f7f63b6af0824279fb84ecbe9bda90005627bd575c1558b69027ec80944804f08f1840f162f65276464e743b41c087e1515d7789fe
6
+ metadata.gz: d436d009a8cde14cae2241736faa8875bdb2027804cfd0152fe04d0c052223f95aade87a8f8b59b90a3b95ab28d5d633aa6766e9cc89d9e8a214e56fabec39f7
7
+ data.tar.gz: 9654a3fa16ac88ea60ae7058c3cae6c39ea5e2608097658f36b85b574d44c0ef678c34911da83dba0e25084770425a86472492e34343538ff784db1030618fc8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-ssl-check (2.4.0)
4
+ fluent-plugin-ssl-check (2.4.1)
5
5
  fluentd (>= 0.14.10, < 2)
6
6
 
7
7
  GEM
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'fluent-plugin-ssl-check'
8
- spec.version = '2.4.0'
8
+ spec.version = '2.4.1'
9
9
  spec.authors = ['Thomas Tych']
10
10
  spec.email = ['thomas.tych@gmail.com']
11
11
 
@@ -32,7 +32,6 @@ module Fluent
32
32
  Fluent::Plugin.register_input(NAME, self)
33
33
 
34
34
  include Fluent::Plugin::SslCheck::SslInputEmit
35
- include Fluent::Plugin::SslCheck::SslCommon
36
35
 
37
36
  DEFAULT_TAG = NAME
38
37
  DEFAULT_PORT = 443
@@ -104,7 +103,6 @@ module Fluent
104
103
  timer_execute(:ssl_check_timer, interval, repeat: true, &method(:check))
105
104
  end
106
105
 
107
- # rubocop:disable Lint/SuppressedException
108
106
  def check
109
107
  hosts.each do |host_full|
110
108
  host, port = host_full.split(':')
@@ -112,10 +110,10 @@ module Fluent
112
110
  ssl_info = fetch_ssl_info(host, port)
113
111
  emit_logs(ssl_info) if log_events
114
112
  emit_metrics(ssl_info) if metric_events
115
- rescue StandardError
113
+ rescue StandardError => e
114
+ log.warn "#{NAME}#check: #{e}"
116
115
  end
117
116
  end
118
- # rubocop:enable Lint/SuppressedException
119
117
 
120
118
  def fetch_ssl_info(host, port)
121
119
  ssl_client = SslClient.new(
@@ -139,6 +137,8 @@ module Fluent
139
137
  # ssl client
140
138
  # to check ssl status
141
139
  class SslClient
140
+ include Fluent::Plugin::SslCheck::SslCommon
141
+
142
142
  attr_reader :host, :port, :ca_path, :ca_file, :sni, :verify_mode, :cert, :key, :timeout
143
143
 
144
144
  # rubocop:disable Metrics/ParameterLists
@@ -84,16 +84,15 @@ module Fluent
84
84
  timer_execute(:ssl_file_check_timer, interval, repeat: true, &method(:check))
85
85
  end
86
86
 
87
- # rubocop:disable Lint/SuppressedException
88
87
  def check
89
88
  paths.each do |cert_path|
90
89
  ssl_info = fetch_ssl_info(cert_path)
91
90
  emit_logs(ssl_info) if log_events
92
91
  emit_metrics(ssl_info) if metric_events
93
- rescue StandardError
92
+ rescue StandardError => e
93
+ log.warn "#{NAME}#check: #{e}"
94
94
  end
95
95
  end
96
- # rubocop:enable Lint/SuppressedException
97
96
 
98
97
  def fetch_ssl_info(filepath)
99
98
  ssl_file = Fluent::Plugin::SslCheck::FileChecker.new(filepath, ca_path: ca_path, ca_file: ca_file)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-ssl-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Tych
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-06 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bump