fluent-plugin-elasticsearch-stats 0.7.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: 9f3121d57f2187109f827fbc89e6bdd71d314de37b136e9474b5ce5bb9b2f64e
4
- data.tar.gz: 2fa291fbcd27e0b787cb35662e4dc31eaf41d4c397d5ac086a3d2ad2b5823c99
3
+ metadata.gz: 2d3d6ad20934f74a557c9d11de96973a77cd3eca8bc179918fcc169a28b00282
4
+ data.tar.gz: eeb6396c4c5fe4273890cbf79dc56c322f32fb8c1c2a39e47b9626336c50713a
5
5
  SHA512:
6
- metadata.gz: ee56b271b69d891dfea4a207c2759a45fec2429e68bb8af5374964ba4e45793c860ac82c9a44315dd947bc4034f5bc958ec612ded6cba033acd25e718d283bc5
7
- data.tar.gz: 2ea390b2b675bfa0f2472de5490dadd2d92268c49fe5e02ed552b728f21ad388897db16388e6cfd17d39df4c7d201ee223a9813d85abc48d6cba29b5a9505364
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.7.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)
@@ -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.7.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)
@@ -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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elasticsearch-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Tych
@@ -249,7 +249,7 @@ licenses:
249
249
  metadata:
250
250
  homepage_uri: https://gitlab.com/ttych/fluent-plugin-elasticsearch-stats
251
251
  source_code_uri: https://gitlab.com/ttych/fluent-plugin-elasticsearch-stats
252
- documentation_uri: http://www.rubydoc.info/gems/fluent-plugin-elasticsearch-stats/0.7.0
252
+ documentation_uri: http://www.rubydoc.info/gems/fluent-plugin-elasticsearch-stats/0.8.0
253
253
  rubygems_mfa_required: 'true'
254
254
  rdoc_options: []
255
255
  require_paths: