fluent-plugin-elasticsearch-stats 0.6.0 → 0.8.0

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: fc6e000fbec0775f72253f8f06d1b106da5a9fee93fc2d3e97201c97c03d51f0
4
- data.tar.gz: 4689ab101c5c6bf3780122e3574cf847937fa49e4992f56379dd54b5c1dd2fc1
3
+ metadata.gz: 2d3d6ad20934f74a557c9d11de96973a77cd3eca8bc179918fcc169a28b00282
4
+ data.tar.gz: eeb6396c4c5fe4273890cbf79dc56c322f32fb8c1c2a39e47b9626336c50713a
5
5
  SHA512:
6
- metadata.gz: 5545ec448d383a788d7cac8bb90dcf5917dbe46ed4d9835850e293255326b7e8b77221ded6a249275d8a20b078ca73989a5b8af1e63e9748af456edcec55d179
7
- data.tar.gz: f817cb0db3deaeba7b6393f81d7184e6b593224e2dcdd6b59a52f019759888f1c1c75020c6aeba9bd4216f6d9c8e1d01f9af0e4df495dc141fd87ec026ed488e
6
+ metadata.gz: 2aaf767c4a46edd8783b661c99ade6af95ef89ff4696e8f1244ed95dafb3875f447e4a70414f165383e3ce47e44c5b09996dd5b2e7a6eff6d04d9732adfcd103
7
+ data.tar.gz: 55d959680d54b175d6096d2c555ea02e0eb02adcfbfd9c6091007b42a382692c504e7f6cf857f7a61d56fe002e32c946a00470128684a471132585c2c0b8a550
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-elasticsearch-stats (0.6.0)
4
+ fluent-plugin-elasticsearch-stats (0.8.0)
5
5
  faraday (~> 2.9)
6
6
  faraday-retry (~> 2.2, >= 2.2.1)
7
7
  fluentd (>= 0.14.10, < 2)
@@ -9,117 +9,193 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- ast (2.4.2)
13
- bigdecimal (3.1.6)
12
+ addressable (2.8.9)
13
+ public_suffix (>= 2.0.2, < 8.0)
14
+ ast (2.4.3)
15
+ async (2.38.1)
16
+ console (~> 1.29)
17
+ fiber-annotation
18
+ io-event (~> 1.11)
19
+ metrics (~> 0.12)
20
+ traces (~> 0.18)
21
+ async-http (0.94.2)
22
+ async (>= 2.10.2)
23
+ async-pool (~> 0.11)
24
+ io-endpoint (~> 0.14)
25
+ io-stream (~> 0.6)
26
+ metrics (~> 0.12)
27
+ protocol-http (~> 0.58)
28
+ protocol-http1 (~> 0.36)
29
+ protocol-http2 (~> 0.22)
30
+ protocol-url (~> 0.2)
31
+ traces (~> 0.10)
32
+ async-pool (0.11.2)
33
+ async (>= 2.0)
34
+ base64 (0.3.0)
35
+ bigdecimal (4.0.1)
14
36
  bump (0.10.0)
15
37
  byebug (11.1.3)
16
- concurrent-ruby (1.2.3)
17
- cool.io (1.8.0)
18
- docile (1.4.0)
19
- dry-configurable (1.1.0)
20
- dry-core (~> 1.0, < 2)
38
+ concurrent-ruby (1.3.6)
39
+ console (1.34.3)
40
+ fiber-annotation
41
+ fiber-local (~> 1.1)
42
+ json
43
+ cool.io (1.9.3)
44
+ csv (3.3.5)
45
+ docile (1.4.1)
46
+ drb (2.2.3)
47
+ dry-configurable (1.3.0)
48
+ dry-core (~> 1.1)
21
49
  zeitwerk (~> 2.6)
22
- dry-core (1.0.1)
50
+ dry-core (1.2.0)
23
51
  concurrent-ruby (~> 1.0)
52
+ logger
24
53
  zeitwerk (~> 2.6)
25
- dry-inflector (1.0.0)
26
- dry-initializer (3.1.1)
27
- dry-logic (1.5.0)
54
+ dry-inflector (1.3.1)
55
+ dry-initializer (3.2.0)
56
+ dry-logic (1.6.0)
57
+ bigdecimal
28
58
  concurrent-ruby (~> 1.0)
29
- dry-core (~> 1.0, < 2)
59
+ dry-core (~> 1.1)
30
60
  zeitwerk (~> 2.6)
31
- dry-schema (1.13.3)
61
+ dry-schema (1.16.0)
32
62
  concurrent-ruby (~> 1.0)
33
63
  dry-configurable (~> 1.0, >= 1.0.1)
34
- dry-core (~> 1.0, < 2)
35
- dry-initializer (~> 3.0)
36
- dry-logic (>= 1.4, < 2)
37
- dry-types (>= 1.7, < 2)
64
+ dry-core (~> 1.1)
65
+ dry-initializer (~> 3.2)
66
+ dry-logic (~> 1.6)
67
+ dry-types (~> 1.9, >= 1.9.1)
38
68
  zeitwerk (~> 2.6)
39
- dry-types (1.7.2)
40
- bigdecimal (~> 3.0)
69
+ dry-types (1.9.1)
70
+ bigdecimal (>= 3.0)
41
71
  concurrent-ruby (~> 1.0)
42
72
  dry-core (~> 1.0)
43
73
  dry-inflector (~> 1.0)
44
74
  dry-logic (~> 1.4)
45
75
  zeitwerk (~> 2.6)
46
- faraday (2.9.0)
47
- faraday-net_http (>= 2.0, < 3.2)
48
- faraday-net_http (3.1.0)
49
- net-http
50
- faraday-retry (2.2.1)
76
+ faraday (2.14.1)
77
+ faraday-net_http (>= 2.0, < 3.5)
78
+ json
79
+ logger
80
+ faraday-net_http (3.4.2)
81
+ net-http (~> 0.5)
82
+ faraday-retry (2.4.0)
51
83
  faraday (~> 2.0)
52
- fluentd (1.16.3)
84
+ fiber-annotation (0.2.0)
85
+ fiber-local (1.1.0)
86
+ fiber-storage
87
+ fiber-storage (1.0.1)
88
+ fluentd (1.19.2)
89
+ async-http (~> 0.86)
90
+ base64 (~> 0.2)
53
91
  bundler
54
92
  cool.io (>= 1.4.5, < 2.0.0)
93
+ csv (~> 3.2)
94
+ drb (~> 2.2)
55
95
  http_parser.rb (>= 0.5.1, < 0.9.0)
96
+ logger (~> 1.6)
56
97
  msgpack (>= 1.3.1, < 2.0.0)
98
+ net-http (~> 0.8)
99
+ ostruct (~> 0.6)
57
100
  serverengine (>= 2.3.2, < 3.0.0)
58
101
  sigdump (~> 0.2.5)
59
102
  strptime (>= 0.2.4, < 1.0.0)
60
103
  tzinfo (>= 1.0, < 3.0)
61
104
  tzinfo-data (~> 1.0)
105
+ uri (~> 1.0)
62
106
  webrick (~> 1.4)
63
107
  yajl-ruby (~> 1.0)
64
- http_parser.rb (0.8.0)
65
- json (2.7.1)
66
- language_server-protocol (3.17.0.3)
67
- msgpack (1.7.2)
68
- net-http (0.4.1)
69
- uri
70
- parallel (1.24.0)
71
- parser (3.3.0.5)
108
+ zstd-ruby (~> 1.5)
109
+ http_parser.rb (0.8.1)
110
+ io-endpoint (0.17.2)
111
+ io-event (1.14.4)
112
+ io-stream (0.11.1)
113
+ json (2.19.2)
114
+ json-schema (6.2.0)
115
+ addressable (~> 2.8)
116
+ bigdecimal (>= 3.1, < 5)
117
+ language_server-protocol (3.17.0.5)
118
+ lint_roller (1.1.0)
119
+ logger (1.7.0)
120
+ mcp (0.9.0)
121
+ json-schema (>= 4.1)
122
+ metrics (0.15.0)
123
+ msgpack (1.8.0)
124
+ net-http (0.9.1)
125
+ uri (>= 0.11.1)
126
+ ostruct (0.6.3)
127
+ parallel (1.27.0)
128
+ parser (3.3.10.2)
72
129
  ast (~> 2.4.1)
73
130
  racc
74
- power_assert (2.0.3)
75
- racc (1.7.3)
131
+ power_assert (3.0.1)
132
+ prism (1.9.0)
133
+ protocol-hpack (1.5.1)
134
+ protocol-http (0.60.0)
135
+ protocol-http1 (0.37.0)
136
+ protocol-http (~> 0.58)
137
+ protocol-http2 (0.24.0)
138
+ protocol-hpack (~> 1.4)
139
+ protocol-http (~> 0.47)
140
+ protocol-url (0.4.0)
141
+ public_suffix (7.0.5)
142
+ racc (1.8.1)
76
143
  rainbow (3.1.1)
77
144
  rake (13.1.0)
78
- reek (6.3.0)
79
- dry-schema (~> 1.13.0)
145
+ reek (6.5.0)
146
+ dry-schema (~> 1.13)
147
+ logger (~> 1.6)
80
148
  parser (~> 3.3.0)
81
149
  rainbow (>= 2.0, < 4.0)
82
150
  rexml (~> 3.1)
83
- regexp_parser (2.9.0)
84
- rexml (3.2.6)
85
- rubocop (1.60.2)
151
+ regexp_parser (2.11.3)
152
+ rexml (3.4.4)
153
+ rubocop (1.85.1)
86
154
  json (~> 2.3)
87
- language_server-protocol (>= 3.17.0)
155
+ language_server-protocol (~> 3.17.0.2)
156
+ lint_roller (~> 1.1.0)
157
+ mcp (~> 0.6)
88
158
  parallel (~> 1.10)
89
159
  parser (>= 3.3.0.2)
90
160
  rainbow (>= 2.2.2, < 4.0)
91
- regexp_parser (>= 1.8, < 3.0)
92
- rexml (>= 3.2.5, < 4.0)
93
- rubocop-ast (>= 1.30.0, < 2.0)
161
+ regexp_parser (>= 2.9.3, < 3.0)
162
+ rubocop-ast (>= 1.49.0, < 2.0)
94
163
  ruby-progressbar (~> 1.7)
95
- unicode-display_width (>= 2.4.0, < 3.0)
96
- rubocop-ast (1.30.0)
97
- parser (>= 3.2.1.0)
164
+ unicode-display_width (>= 2.4.0, < 4.0)
165
+ rubocop-ast (1.49.1)
166
+ parser (>= 3.3.7.2)
167
+ prism (~> 1.7)
98
168
  rubocop-rake (0.6.0)
99
169
  rubocop (~> 1.0)
100
170
  ruby-progressbar (1.13.0)
101
- serverengine (2.3.2)
171
+ serverengine (2.4.0)
172
+ base64 (~> 0.1)
173
+ logger (~> 1.4)
102
174
  sigdump (~> 0.2.2)
103
175
  sigdump (0.2.5)
104
176
  simplecov (0.22.0)
105
177
  docile (~> 1.1)
106
178
  simplecov-html (~> 0.11)
107
179
  simplecov_json_formatter (~> 0.1)
108
- simplecov-html (0.12.3)
180
+ simplecov-html (0.13.2)
109
181
  simplecov_json_formatter (0.1.4)
110
182
  strptime (0.2.5)
111
- test-unit (3.6.2)
183
+ test-unit (3.6.9)
112
184
  power_assert
113
- timecop (0.9.8)
185
+ timecop (0.9.10)
186
+ traces (0.18.2)
114
187
  tzinfo (2.0.6)
115
188
  concurrent-ruby (~> 1.0)
116
- tzinfo-data (1.2024.1)
189
+ tzinfo-data (1.2026.1)
117
190
  tzinfo (>= 1.0.0)
118
- unicode-display_width (2.5.0)
119
- uri (0.13.0)
120
- webrick (1.8.1)
191
+ unicode-display_width (3.2.0)
192
+ unicode-emoji (~> 4.1)
193
+ unicode-emoji (4.2.0)
194
+ uri (1.1.1)
195
+ webrick (1.9.2)
121
196
  yajl-ruby (1.4.3)
122
- zeitwerk (2.6.13)
197
+ zeitwerk (2.7.5)
198
+ zstd-ruby (1.5.7.1)
123
199
 
124
200
  PLATFORMS
125
201
  ruby
@@ -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-elasticsearch-stats'
8
- spec.version = '0.6.0'
8
+ spec.version = '0.8.0'
9
9
  spec.authors = ['Thomas Tych']
10
10
  spec.email = ['thomas.tych@gmail.com']
11
11
 
@@ -82,9 +82,10 @@ module Fluent
82
82
  end
83
83
 
84
84
  def metadata
85
- Metadata.new
86
- .set(label: 'cluster_name', value: cluster_info['cluster_name'])
87
- # .set(label: 'cluster_url', value: client.url)
85
+ Metadata.new.tap do |metadata|
86
+ metadata.set(label: 'cluster_name', value: cluster_info['cluster_name'])
87
+ metadata.set(label: 'cluster_url ', value: client.url) if stats_config.metadata_cluster_url
88
+ end
88
89
  end
89
90
 
90
91
  def cluster_info(ttl: CLUSTER_INFO_TTL)
@@ -43,10 +43,10 @@ module Fluent
43
43
 
44
44
  def convert_status(status)
45
45
  case status.downcase
46
- when 'green' then 0
47
- when 'yellow' then 1
48
- when 'red' then 2
49
- else 3
46
+ when 'green' then 1
47
+ when 'yellow' then 2
48
+ when 'red' then 3
49
+ else 0
50
50
  end
51
51
  end
52
52
 
@@ -56,6 +56,8 @@ module Fluent
56
56
  DEFAULT_AGGREGATED_INDEX_METRICS_ONLY = false
57
57
  DEFAULT_AGGREGATED_INDEX_METRICS = ['sum']
58
58
 
59
+ DEFAULT_METADATA_CLUSTER_URL = true
60
+
59
61
  ALLOWED_CLUSTER_HEALTH_LEVELS = Fluent::Plugin::ElasticsearchStats::Client::ALLOWED_CLUSTER_HEALTH_LEVELS
60
62
  ALLOWED_NODES_STATS_LEVELS = Fluent::Plugin::ElasticsearchStats::Client::ALLOWED_NODES_STATS_LEVELS
61
63
  ALLOWED_INDICES_STATS_LEVELS = Fluent::Plugin::ElasticsearchStats::Client::ALLOWED_INDICES_LEVELS
@@ -133,6 +135,9 @@ module Fluent
133
135
  # desc 'skip system indices'
134
136
  # config_param :skip_system_indices, :bool, default: DEFAULT_SKIP_SYSTEM_INDICES
135
137
 
138
+ desc 'add cluster url as metadata'
139
+ config_param :metadata_cluster_url, :bool, default: DEFAULT_METADATA_CLUSTER_URL
140
+
136
141
  def configure(conf)
137
142
  super
138
143
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elasticsearch-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Tych
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-31 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bump
@@ -216,7 +215,6 @@ dependencies:
216
215
  - - "<"
217
216
  - !ruby/object:Gem::Version
218
217
  version: '2'
219
- description:
220
218
  email:
221
219
  - thomas.tych@gmail.com
222
220
  executables: []
@@ -226,7 +224,6 @@ files:
226
224
  - ".gitignore"
227
225
  - ".gitlab-ci.yml"
228
226
  - ".rubocop.yml"
229
- - ".ruby-version"
230
227
  - Gemfile
231
228
  - Gemfile.lock
232
229
  - LICENSE
@@ -252,9 +249,8 @@ licenses:
252
249
  metadata:
253
250
  homepage_uri: https://gitlab.com/ttych/fluent-plugin-elasticsearch-stats
254
251
  source_code_uri: https://gitlab.com/ttych/fluent-plugin-elasticsearch-stats
255
- documentation_uri: http://www.rubydoc.info/gems/fluent-plugin-elasticsearch-stats/0.6.0
252
+ documentation_uri: http://www.rubydoc.info/gems/fluent-plugin-elasticsearch-stats/0.8.0
256
253
  rubygems_mfa_required: 'true'
257
- post_install_message:
258
254
  rdoc_options: []
259
255
  require_paths:
260
256
  - lib
@@ -269,8 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
265
  - !ruby/object:Gem::Version
270
266
  version: '0'
271
267
  requirements: []
272
- rubygems_version: 3.5.18
273
- signing_key:
268
+ rubygems_version: 4.0.8
274
269
  specification_version: 4
275
270
  summary: fluentd plugin to generate elasticsearch cluster stats events.
276
271
  test_files: []
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.3.5