logstash-output-splunk 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: b521d0bd83dfc50757e1c573198cf9d9721bb0ca
4
- data.tar.gz: 00f6e480d8a1f75182f20775327ff0f885df31e3
3
+ metadata.gz: bdbcd69ec7d285096f574999afdbe1c9ec53e5c8
4
+ data.tar.gz: e97ea27cdb39c84e6fec70f7c997e6a9681a7cfc
5
5
  SHA512:
6
- metadata.gz: 81e4a852bae286a84f9ad3e564e56028f7e03665a27912d012925cb1532b9c965a97840c23867e7a0ae82ef5a2277c49fc1a35e3232a33202553ba2a70f5f99d
7
- data.tar.gz: 12f316ee5e846ec5e30dbb141a91b00187b74a2424edaf612571acbb204e6d233b624460ebbb355e4759220c7388974b1063f3a6e3ab5b1fae8d84dd504d68a1
6
+ metadata.gz: 4dc4ca92bdffd32cf97b6f20ad7a79f1d5bdba5941f850a7899e75f6ebe0ea0710810dbfeb337c13855fdf6c25c159afb38294213d42d84c8446b147f4e1ee1b
7
+ data.tar.gz: b8bab1a1511125ed4261b31163a040b34b400e9b95fd3d58c2f77c38d286922de9bad7e16dad45aababa0a595e74ff61dd2fc013afc1ca0339c37f3866944a67
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.0.3
2
+ - Refactor code
3
+
1
4
  ## 0.0.2
2
5
  - Raw endpoint support
3
6
 
data/README.md CHANGED
@@ -18,9 +18,6 @@ output {
18
18
  channel_identifier => "FE0ECFAD-13D5-401B-847D-77833BD77133"
19
19
  is_raw => true
20
20
  is_batch => true
21
- mapping => {
22
- "event" => "%{message}"
23
- }
24
21
  }
25
22
  }
26
23
  </code></pre>
@@ -93,4 +90,4 @@ bin/logstash-plugin install --no-verify
93
90
  bin/plugin install --no-verify
94
91
 
95
92
  ```
96
- - Start Logstash and proceed to test the plugin
93
+ - Start Logstash and proceed to test the plugin
@@ -294,11 +294,7 @@ class LogStash::Outputs::Splunk < LogStash::Outputs::Base
294
294
  def event_body(event)
295
295
  # TODO: Create an HTTP post data codec, use that here
296
296
  if @is_batch
297
- if @is_raw
298
- event.map {|e| map_event(e).fetch("message") }.join("\n")
299
- else
300
- event.map {|e| LogStash::Json.dump(map_event(e)) }.join("\n")
301
- end
297
+ event.map {|e| LogStash::Json.dump(map_event(e)) }.join("\n")
302
298
  else
303
299
  LogStash::Json.dump(map_event(event))
304
300
  end
@@ -330,11 +326,10 @@ class LogStash::Outputs::Splunk < LogStash::Outputs::Base
330
326
 
331
327
  def map_event(event)
332
328
  if @mapping
333
- msg_body = convert_mapping(@mapping, event)
329
+ convert_mapping(@mapping, event)
334
330
  else
335
- msg_body = event.to_hash
331
+ event.to_hash
336
332
  end
337
- {"event" => msg_body}
338
333
  end
339
334
 
340
335
  def event_headers(event)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-splunk'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Sends events to a Splunk HTTP Event Collector REST API endpoints"
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-splunk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jian Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-21 00:00:00.000000000 Z
11
+ date: 2020-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core-plugin-api