fluent-plugin-sumologic_output 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/README.md +2 -1
- data/fluent-plugin-sumologic_output.gemspec +1 -1
- data/lib/fluent/plugin/out_sumologic.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b2260d6a95c18397cc58bb448924c2a24f3c28c
|
4
|
+
data.tar.gz: 1276401aa4df5460ee70dfb4424202874800e997
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09326bd5f95564b91f9d124ce397c292d2069734e3e75bd0d2b73de4cb09389ee903dbbbbad177d299d527d6c8c68dc723fd5d69727f7eaa92ffef223b610b07'
|
7
|
+
data.tar.gz: 80c274b634f568abe34b5eaaeb9521b6407181af7244229fd2c0f5bd28eb58e7ed1435348c67603fcf21dce6d773758d0508da4402ad4d24733d44a19221f058
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -13,7 +13,8 @@ Configuration options for fluent.conf are:
|
|
13
13
|
* `endpoint` - SumoLogic HTTP Collector URL
|
14
14
|
* `verify_ssl` - Verify ssl certificate. (default is `true`)
|
15
15
|
* `source_category` - Set _sourceCategory metadata field within SumoLogic (default is `nil`)
|
16
|
-
* `source_name` - Set _sourceName metadata field within SumoLogic (default is `nil`)
|
16
|
+
* `source_name` - Set _sourceName metadata field within SumoLogic - overrides source_name_key (default is `nil`)
|
17
|
+
* `source_name_key` - Set as source::path_key's value so that the source_name can be extracted from Fluentd's buffer (default `source_name`)
|
17
18
|
* `source_host` - Set _sourceHost metadata field within SumoLogic (default is `nil`)
|
18
19
|
* `log_format` - Format to post logs into Sumo. (default `json`)
|
19
20
|
* text - Logs will appear in SumoLogic in text format (taken from the field specified in `log_key`)
|
@@ -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 = "0.0.
|
7
|
+
gem.version = "0.0.6"
|
8
8
|
gem.authors = ["Steven Adams"]
|
9
9
|
gem.email = ["stevezau@gmail.com"]
|
10
10
|
gem.description = %q{Output plugin to SumoLogic HTTP Endpoint}
|
@@ -44,6 +44,7 @@ class Sumologic < Fluent::BufferedOutput
|
|
44
44
|
config_param :log_key, :string, :default => 'message'
|
45
45
|
config_param :source_category, :string, :default => nil
|
46
46
|
config_param :source_name, :string, :default => nil
|
47
|
+
config_param :source_name_key, :string, :default => 'source_name'
|
47
48
|
config_param :source_host, :string, :default => nil
|
48
49
|
config_param :verify_ssl, :bool, :default => true
|
49
50
|
|
@@ -115,7 +116,10 @@ class Sumologic < Fluent::BufferedOutput
|
|
115
116
|
|
116
117
|
# Sort messages
|
117
118
|
chunk.msgpack_each do |tag, time, record|
|
118
|
-
|
119
|
+
# plugin dies randomly
|
120
|
+
# https://github.com/uken/fluent-plugin-elasticsearch/commit/8597b5d1faf34dd1f1523bfec45852d380b26601#diff-ae62a005780cc730c558e3e4f47cc544R94
|
121
|
+
next unless record.is_a? Hash
|
122
|
+
sumo_metadata = record.fetch('_sumo_metadata', {'source' => record[@source_name_key]})
|
119
123
|
key = sumo_key(sumo_metadata)
|
120
124
|
log_format = sumo_metadata['log_format'] || @log_format
|
121
125
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-sumologic_output
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Adams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
86
|
rubyforge_project:
|
87
|
-
rubygems_version: 2.6.
|
87
|
+
rubygems_version: 2.6.12
|
88
88
|
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: Output plugin to SumoLogic HTTP Endpoint
|