fluent-plugin-sumologic_output 1.6.0 → 1.6.1

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
  SHA256:
3
- metadata.gz: 133846d8832ef986550e20aa4d830f1b38c22528398ed4ef589af16cf553be2e
4
- data.tar.gz: 6dde4d581727f2c6703b0e31d1907b935f53dd744b2b133ba36ca8ba437338c2
3
+ metadata.gz: ec49fe6284202d7f57bdd3b59b06f5248d5345e84b7fd955f69b47c069db28e6
4
+ data.tar.gz: 80389b25c291df5258a4313f1025e5e84507207f5f11911b768ecc273391738b
5
5
  SHA512:
6
- metadata.gz: d9f7bb3b6a59030a406eaac3c69568f03c98c4dd00578f1a089687e7d8e7d2f2a5e3f1ce7d76eaecda0ea26a8dd4519f0ee8ea2533b85bcdc9f75fdca0b703f0
7
- data.tar.gz: 0d7074aeb0dfcca743cce825690e4b5fd03f3c13e01df0bfb94b85762639747d51b1c7434aa15b84ea83db790507fd058b16098ec01f42eb6ce236dca57407c2
6
+ metadata.gz: 3fb838f98317572424ad7969450b4f7811a94a80de123e39ce8da9ff0dc9fb1448e1262686e930260142816732ae0ce0420b9b3b52f9d9ade5807e86951dd9e0
7
+ data.tar.gz: 8a19573a03b6dd156fa25f74aeff3adb9059877f5ffcd1701c25f3a359d83e04668d9647c70dc1eb47f3e5cf3da6c2b6e3cb57c2ebec8cf9205d64b3e911bbe5
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "fluent-plugin-sumologic_output"
7
- gem.version = "1.6.0"
7
+ gem.version = "1.6.1"
8
8
  gem.authors = ["Steven Adams", "Frank Reno"]
9
9
  gem.email = ["stevezau@gmail.com", "frank.reno@me.com"]
10
10
  gem.description = %q{Output plugin to SumoLogic HTTP Endpoint}
@@ -198,7 +198,8 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
198
198
  fields = sumo_metadata['fields'] || ""
199
199
  fields = extract_placeholders(fields, chunk) unless fields.nil?
200
200
 
201
- "#{source_name}:#{source_category}:#{source_host}:#{fields}"
201
+ { :source_name => "#{source_name}", :source_category => "#{source_category}",
202
+ :source_host => "#{source_host}", :fields => "#{fields}" }
202
203
  end
203
204
 
204
205
  # Convert timestamp to 13 digit epoch if necessary
@@ -265,7 +266,8 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
265
266
 
266
267
  # Push logs to sumo
267
268
  messages_list.each do |key, messages|
268
- source_name, source_category, source_host, fields = key.split(':')
269
+ source_name, source_category, source_host, fields = key[:source_name], key[:source_category],
270
+ key[:source_host], key[:fields]
269
271
  @sumo_conn.publish(
270
272
  messages.join("\n"),
271
273
  source_host =source_host,
@@ -455,7 +455,7 @@ class SumologicOutput < Test::Unit::TestCase
455
455
  driver.feed("output.test", time, {'message' => 'test1'})
456
456
  driver.feed("output.test", time, {'message' => 'test2', '_sumo_metadata' => {"fields": "foo=bar"}})
457
457
  driver.feed("output.test", time, {'message' => 'test3', '_sumo_metadata' => {"fields": "foo=bar,sumo=logic"}})
458
- driver.feed("output.test", time, {'message' => 'test4', '_sumo_metadata' => {"fields": "foo=bar,abc=123"}})
458
+ driver.feed("output.test", time, {'message' => 'test4', '_sumo_metadata' => {"fields": "foo=bar,master_url=https://100.64.0.1:443"}})
459
459
  end
460
460
  assert_requested :post, "https://collectors.sumologic.com/v1/receivers/http/1234",
461
461
  headers: {'X-Sumo-Category'=>'test', 'X-Sumo-Client'=>'fluentd-output', 'X-Sumo-Host'=>'test', 'X-Sumo-Name'=>'test'},
@@ -470,7 +470,7 @@ class SumologicOutput < Test::Unit::TestCase
470
470
  body: /\A{"timestamp":\d+.,"message":"test3"}\z/,
471
471
  times:1
472
472
  assert_requested :post, "https://collectors.sumologic.com/v1/receivers/http/1234",
473
- headers: {'X-Sumo-Category'=>'test', 'X-Sumo-Client'=>'fluentd-output', 'X-Sumo-Host'=>'test', 'X-Sumo-Name'=>'test', 'X-Sumo-Fields' => 'foo=bar,abc=123'},
473
+ headers: {'X-Sumo-Category'=>'test', 'X-Sumo-Client'=>'fluentd-output', 'X-Sumo-Host'=>'test', 'X-Sumo-Name'=>'test', 'X-Sumo-Fields' => 'foo=bar,master_url=https://100.64.0.1:443'},
474
474
  body: /\A{"timestamp":\d+.,"message":"test4"}\z/,
475
475
  times:1
476
476
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-sumologic_output
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Adams
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-10-16 00:00:00.000000000 Z
12
+ date: 2019-10-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler