fluent-plugin-sumologic_output 1.0.2 → 1.0.3

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
- SHA1:
3
- metadata.gz: 2376e92cd0e9f30f1b6e6bc2c104d518ee6a24fa
4
- data.tar.gz: be4fed0d370128867c82d1d805a1e3b586d7b348
2
+ SHA256:
3
+ metadata.gz: 54258f6c7257bb40c5eaeb5fe2a3bd92cb0d4cca62892f9f22b1416cdc992125
4
+ data.tar.gz: '09eef3fc877543e148bfe60ded7731e6a42cca423c0562c8bcb93b61bed938b4'
5
5
  SHA512:
6
- metadata.gz: efcc29d12a88b25373907ddee4fc604cb872783823aba084979914085bc0bb78ada281db69b7db50984421403fc86619461ec770ce067df055498dbaa218a1e3
7
- data.tar.gz: a85e2c646a196a461ab8c9071cc165c2b0b7dd11dc773f079f23fa5984ea5a43a5429b0f4615b10146de2f27c9b08c4a9c55be6e3c9e66dbbc75cfcd170e1c42
6
+ metadata.gz: f04e86d4624beb559182c3b2e772ea5dd8c2d1bb11fc5cd6456765455d4d68e2a2272f801f19cfc5983828a6c93ad13bd1c381f0ca6f36abe7915a752898c1f6
7
+ data.tar.gz: fcb4fbb90ebd1d4f63a418edc585164454b428bd4bfd46d9f06bf57d2a368383b6265c7e87f699d1755ae9d9ca3c681f79c39e71425e602bbdfd4dd63f3aafe7
data/README.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This plugin has been designed to output logs to [SumoLogic](http://www.sumologic.com) via a [HTTP collector endpoint](http://help.sumologic.com/Send_Data/Sources/02Sources_for_Hosted_Collectors/HTTP_Source)
4
4
 
5
+ | TLS Deprecation Notice |
6
+ | --- |
7
+ | In keeping with industry standard security best practices, as of May 31, 2018, the Sumo Logic service will only support TLS version 1.2 going forward. Verify that all connections to Sumo Logic endpoints are made from software that supports TLS 1.2. |
8
+
9
+ ## Support
10
+ The code in this repository has been contributed by the Sumo Logic community and is not officially supported by Sumo Logic. For any issues or questions please submit an issue through GitHub or start a conversation within the [Sumo Logic Community](https://community.sumologic.com) forums. The maintainers of this project will work directly with the community to answer any questions, address bugs, or review any requests for new features.
11
+
5
12
  ## Installation
6
13
 
7
14
  gem install fluent-plugin-sumologic_output
@@ -23,6 +30,7 @@ Configuration options for fluent.conf are:
23
30
  * `log_key` - Used to specify the key when merging json or sending logs in text format (default `message`)
24
31
  * `open_timeout` - Set timeout seconds to wait until connection is opened.
25
32
  * `add_timestamp` - Add `timestamp` field to logs before sending to sumologic (default `true`)
33
+ * `proxy_uri` - Add the `uri` of the `proxy` environment if present.
26
34
 
27
35
  Reading from the JSON formatted log files with `in_tail` and wildcard filenames:
28
36
  ```
@@ -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.2"
7
+ gem.version = "1.0.3"
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}
@@ -8,9 +8,9 @@ class SumologicConnection
8
8
 
9
9
  attr_reader :http
10
10
 
11
- def initialize(endpoint, verify_ssl, connect_timeout)
11
+ def initialize(endpoint, verify_ssl, connect_timeout, proxy_uri)
12
12
  @endpoint = endpoint
13
- create_http_client(verify_ssl, connect_timeout)
13
+ create_http_client(verify_ssl, connect_timeout, proxy_uri)
14
14
  end
15
15
 
16
16
  def publish(raw_data, source_host=nil, source_category=nil, source_name=nil)
@@ -35,8 +35,8 @@ class SumologicConnection
35
35
  verify_ssl ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE
36
36
  end
37
37
 
38
- def create_http_client(verify_ssl, connect_timeout)
39
- @http = HTTPClient.new
38
+ def create_http_client(verify_ssl, connect_timeout, proxy_uri)
39
+ @http = HTTPClient.new(proxy_uri)
40
40
  @http.ssl_config.verify_mode = ssl_options(verify_ssl)
41
41
  @http.connect_timeout = connect_timeout
42
42
  end
@@ -61,6 +61,7 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
61
61
  config_param :delimiter, :string, :default => "."
62
62
  config_param :open_timeout, :integer, :default => 60
63
63
  config_param :add_timestamp, :bool, :default => true
64
+ config_param :proxy_uri, :string, :default => nil
64
65
 
65
66
  config_section :buffer do
66
67
  config_set_default :@type, DEFAULT_BUFFER_TYPE
@@ -84,7 +85,7 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
84
85
  raise Fluent::ConfigError, "Invalid log_format #{conf['log_format']} must be text, json or json_merge"
85
86
  end
86
87
 
87
- @sumo_conn = SumologicConnection.new(conf['endpoint'], conf['verify_ssl'], conf['open_timeout'].to_i)
88
+ @sumo_conn = SumologicConnection.new(conf['endpoint'], conf['verify_ssl'], conf['open_timeout'].to_i, conf['proxy_uri'])
88
89
  super
89
90
  end
90
91
 
@@ -195,7 +196,7 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
195
196
  log_format = sumo_metadata['log_format'] || @log_format
196
197
 
197
198
  # Strip any unwanted newlines
198
- record[@log_key].chomp! if record[@log_key]
199
+ record[@log_key].chomp! if record[@log_key] && record[@log_key].respond_to?(:chomp!)
199
200
 
200
201
  case log_format
201
202
  when 'text'
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.2
4
+ version: 1.0.3
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: 2018-04-09 00:00:00.000000000 Z
12
+ date: 2018-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -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.5.2
121
+ rubygems_version: 2.7.6
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Output plugin to SumoLogic HTTP Endpoint