fluent-plugin-splunk-enterprise 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb85af7ba58cfc9f2d47a14ee2eb71d1239420d3
4
- data.tar.gz: 52e51db9dbaedd9d38ddf439fe2279d8d689aff1
3
+ metadata.gz: c09f7e1073b95b11fd6905187df61e58012970cf
4
+ data.tar.gz: 920cd3d7009b73a5c8a1adda7e1fd9c8db81c353
5
5
  SHA512:
6
- metadata.gz: b564799eaa55478c8e5eb6a5d69e0bef89c690efd804729bad983468da8d3150911893e52468077387e9816c6c6066dd0654b26c76741432fbea7018043d1517
7
- data.tar.gz: a21e310b66a2c86dd9e9d3f1dbbb0989ba1a5bd80a6b681938b6864c99157a9054abf7c0941cc981d99725ade9aa3de67156d8253188045c1589eda07205227f
6
+ metadata.gz: e82c40cf853cb22ed0df8a35179376ee084dcc31e40693ce9a099e3c9344806e662c582648888dea3945eed7a5fd21e52d3bdc66a2bd4c49df1bed561c0df10e
7
+ data.tar.gz: 0a313b9456ce8fcdea30de949ffd81101877a59097a151b822b924cdaec9d30942632dfac0355417bd18f39b269bfd5efadd570aaf5c0c3667d0bb5a301689d5
@@ -1,3 +1,9 @@
1
+ # Release v0.9.2 - 2019/03/14
2
+
3
+ ## Enhancements
4
+
5
+ * out_splunk_hec: Add `remove_host_key`, `remove_source_key` and `remove_index_key`
6
+
1
7
  # Release v0.9.1 - 2018/08/14
2
8
 
3
9
  ## New Features
@@ -82,7 +82,11 @@ If you set this, the value is set as host metadata.
82
82
 
83
83
  If you set this, the value associated with this key in each record is used as host metadata. When the key is missing, `default_host` is used.
84
84
 
85
- ### defaout_source
85
+ ### remove_host_key
86
+
87
+ If you set this, the field specified by the `host_key` will be removed
88
+
89
+ ### default_source
86
90
 
87
91
  If you set this, the value is set as source metadata.
88
92
 
@@ -90,6 +94,10 @@ If you set this, the value is set as source metadata.
90
94
 
91
95
  If you set this, the value associated with this key in each record is used as source metadata. When the key is missing, `default_source` is used.
92
96
 
97
+ ### remove_source_key
98
+
99
+ If you set this, the field specified by the `source_key` will be removed
100
+
93
101
  ### default_index
94
102
 
95
103
  If you set this, the value is set as index metadata.
@@ -98,6 +106,10 @@ If you set this, the value is set as index metadata.
98
106
 
99
107
  If you set this, the value associated with this key in each record is used as index metadata. When the key is missing, `default_index` is used.
100
108
 
109
+ ### remove_index_key
110
+
111
+ If you set this, the field specified by the `index_key` will be removed
112
+
101
113
  ### sourcetype
102
114
 
103
115
  If you set this, the value is set as sourcetype metadata.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-splunk-enterprise"
7
- spec.version = "0.9.1"
7
+ spec.version = "0.9.2"
8
8
  spec.authors = ["Yuki Ito", "Masahiro Nakagawa"]
9
9
  spec.email = ["yito@treasure-data.com", "repeatedly@gmail.com"]
10
10
 
@@ -15,12 +15,15 @@ module Fluent
15
15
  # for metadata
16
16
  config_param :default_host, :string, default: nil
17
17
  config_param :host_key, :string, default: nil
18
+ config_param :remove_host_key, :bool, default: false
18
19
  config_param :default_source, :string, default: nil
19
20
  config_param :source_key, :string, default: nil
21
+ config_param :remove_source_key, :bool, default: false
20
22
  config_param :default_index, :string, default: nil
21
23
  config_param :index_key, :string, default: nil
24
+ config_param :remove_index_key, :bool, default: false
22
25
  config_param :sourcetype, :string, default: nil
23
- config_param :use_fluentd_time, :bool, default: true
26
+ config_param :use_fluentd_time, :bool, default: true
24
27
 
25
28
  # for Indexer acknowledgement
26
29
  config_param :use_ack, :bool, default: false
@@ -103,19 +106,19 @@ module Fluent
103
106
  msg['sourcetype'] = @sourcetype if @sourcetype
104
107
 
105
108
  if record[@host_key]
106
- msg['host'] = record[@host_key]
109
+ msg['host'] = @remove_host_key ? record.delete(@host_key) : record[@host_key]
107
110
  elsif @default_host
108
111
  msg['host'] = @default_host
109
112
  end
110
113
 
111
114
  if record[@source_key]
112
- msg['source'] = record[@source_key]
115
+ msg['source'] = @remove_source_key ? record.delete(@source_key) : record[@source_key]
113
116
  elsif @default_source
114
117
  msg['source'] = @default_source
115
118
  end
116
119
 
117
120
  if record[@index_key]
118
- msg['index'] = record[@index_key]
121
+ msg['index'] = @remove_index_key ? record.delete(@index_key) : record[@index_key]
119
122
  elsif @default_index
120
123
  msg['index'] = @default_index
121
124
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-splunk-enterprise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Ito
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-08-14 00:00:00.000000000 Z
12
+ date: 2019-03-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd