fluent-plugin-sumologic_output 1.0.1 → 1.0.2
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 +4 -4
- data/README.md +1 -0
- data/fluent-plugin-sumologic_output.gemspec +2 -2
- data/lib/fluent/plugin/out_sumologic.rb +11 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2376e92cd0e9f30f1b6e6bc2c104d518ee6a24fa
|
4
|
+
data.tar.gz: be4fed0d370128867c82d1d805a1e3b586d7b348
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efcc29d12a88b25373907ddee4fc604cb872783823aba084979914085bc0bb78ada281db69b7db50984421403fc86619461ec770ce067df055498dbaa218a1e3
|
7
|
+
data.tar.gz: a85e2c646a196a461ab8c9071cc165c2b0b7dd11dc773f079f23fa5984ea5a43a5429b0f4615b10146de2f27c9b08c4a9c55be6e3c9e66dbbc75cfcd170e1c42
|
data/README.md
CHANGED
@@ -22,6 +22,7 @@ Configuration options for fluent.conf are:
|
|
22
22
|
* json_merge - Same as json but merge content of `log_key` into the top level and strip `log_key`
|
23
23
|
* `log_key` - Used to specify the key when merging json or sending logs in text format (default `message`)
|
24
24
|
* `open_timeout` - Set timeout seconds to wait until connection is opened.
|
25
|
+
* `add_timestamp` - Add `timestamp` field to logs before sending to sumologic (default `true`)
|
25
26
|
|
26
27
|
Reading from the JSON formatted log files with `in_tail` and wildcard filenames:
|
27
28
|
```
|
@@ -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.0.
|
7
|
+
gem.version = "1.0.2"
|
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}
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
|
23
23
|
gem.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
gem.add_development_dependency "rake"
|
25
|
-
gem.add_runtime_dependency "fluentd"
|
25
|
+
gem.add_runtime_dependency "fluentd", ">= 0.14.0"
|
26
26
|
gem.add_development_dependency 'test-unit', '~> 3.1.0'
|
27
27
|
|
28
28
|
gem.add_runtime_dependency 'httpclient', '~> 2.8.0'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
require 'fluent/plugin/output'
|
2
3
|
require 'net/https'
|
3
4
|
require 'yajl'
|
@@ -59,6 +60,7 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
|
|
59
60
|
config_param :verify_ssl, :bool, :default => true
|
60
61
|
config_param :delimiter, :string, :default => "."
|
61
62
|
config_param :open_timeout, :integer, :default => 60
|
63
|
+
config_param :add_timestamp, :bool, :default => true
|
62
64
|
|
63
65
|
config_section :buffer do
|
64
66
|
config_set_default :@type, DEFAULT_BUFFER_TYPE
|
@@ -202,9 +204,15 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
|
|
202
204
|
log.strip!
|
203
205
|
end
|
204
206
|
when 'json_merge'
|
205
|
-
|
207
|
+
if @add_timestamp
|
208
|
+
record = { :timestamp => sumo_timestamp(time) }.merge(record)
|
209
|
+
end
|
210
|
+
log = dump_log(merge_json(record))
|
206
211
|
else
|
207
|
-
|
212
|
+
if @add_timestamp
|
213
|
+
record = { :timestamp => sumo_timestamp(time) }.merge(record)
|
214
|
+
end
|
215
|
+
log = dump_log(record)
|
208
216
|
end
|
209
217
|
|
210
218
|
unless log.nil?
|
@@ -230,3 +238,4 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
|
|
230
238
|
|
231
239
|
end
|
232
240
|
end
|
241
|
+
|
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.0.
|
4
|
+
version: 1.0.2
|
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:
|
12
|
+
date: 2018-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 0.14.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 0.14.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: test-unit
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.5.2
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Output plugin to SumoLogic HTTP Endpoint
|