fluent-plugin-logzio 0.0.12 → 0.0.13

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: 53a6f11cf7cc76a1a040f4ffcb6a74f9c7092cc1
4
- data.tar.gz: ae119c5cf7e4a9df8ff7957ed00b9af96e5ac973
3
+ metadata.gz: cb60223d1da3b7dcbb52f07e9094c2d62e4eef64
4
+ data.tar.gz: 61edf950ff5231802cd82615207cf3d5f43bdf63
5
5
  SHA512:
6
- metadata.gz: 446b665e7978fc897e59b48241a3f114e8174609473c782bb0a882a04022553a8e62bd19695f0f79975717242d626de1b092658e101f3178e2497324240f2e59
7
- data.tar.gz: 39d0c1c09cf89ee70100f733551959fe07e7f2160d92ec17e71fc9abf535b620cdcecf38adb1b7cb8af411a40eb422d1195ee9a9229031d75b0c4e2e5338174a
6
+ metadata.gz: e9e3307a7108db15a6ed7f66171993580fcac951716a1f559b0495a2377a132c635cc78400e2c1f74843a92fad3f62cc6acb70a579706d95a0a84df379796b9e
7
+ data.tar.gz: 5d1bbc1043da77fd3642e620c0490727c27d4d0546c64af633d2c87393772b5c4ac13195d37596bda3c214f790c3a124d4aa46a2fd3c644b0cf846b9367c98a7
data/README.md CHANGED
@@ -24,17 +24,14 @@ With fluent-plugin-logzio you will be able to use [Logz.io](http://logz.io) as o
24
24
  </match>
25
25
  ```
26
26
 
27
- If you absolutly must, use the non-buffered plugin (we really recommend using the buffered)
28
- ```
29
- <match your_match>
30
- @type logzio
31
- endpoint_url http://listener.logz.io:8090?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
32
- </match>
33
- ```
34
-
35
27
  ## Parameters
36
28
  * **endpoint_url** the url to Logz.io input where `xxx-xxxx...` is your Logz.io access token, and `my_type` is the type of your logs in logz.io
37
29
  * **output_include_time** should the appender add a timestamp to your logs on their process time. (recommended)
38
30
  * **output_include_tags** should the appender add the fluentd tag to the document, called "fluentd_tag" (which can be renamed, see next point)
39
31
  * **output_tags_fieldname** set the tag's fieldname, defaults to "fluentd_tag"
40
32
  * **http_idle_timeout** timeout in seconds that the http persistent connection will stay open without traffic
33
+
34
+
35
+ ## Release Notes
36
+ - 0.0.13: BREAKING - Removed non-buffered version. It's really not efficient, and should just not be used. If you are using this version, you should change to the buffered one.
37
+ - 0.0.12: Catch exception when parsing YAML to ignore (instead of crash) not valid logs
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'fluent-plugin-logzio'
7
- s.version = '0.0.12'
7
+ s.version = '0.0.13'
8
8
  s.authors = ['Yury Kotov', 'Roi Rav-Hon']
9
9
  s.email = ['bairkan@gmail.com', 'roi@logz.io']
10
10
  s.homepage = 'https://github.com/logzio/fluent-plugin-logzio'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-logzio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Kotov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-16 00:00:00.000000000 Z
12
+ date: 2017-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-http-persistent
@@ -110,7 +110,6 @@ files:
110
110
  - README.md
111
111
  - Rakefile
112
112
  - fluent-plugin-logzio.gemspec
113
- - lib/fluent/plugin/out_logzio.rb
114
113
  - lib/fluent/plugin/out_logzio_buffered.rb
115
114
  - spec/lib/fluent/plugin/out_logzio_buffered_spec.rb
116
115
  - spec/lib/fluent/plugin/out_logzio_spec.rb
@@ -1,45 +0,0 @@
1
- module Fluent
2
- class LogzioOutput < Fluent::Output
3
- Fluent::Plugin.register_output('logzio', self)
4
- config_param :endpoint_url, :string, default: nil
5
- config_param :output_include_time, :bool, default: true
6
- config_param :output_include_tags, :bool, default: true
7
- config_param :output_tags_fieldname, :string, default: 'fluentd_tags'
8
-
9
- def configure(conf)
10
- super
11
- $log.debug "Logzio url #{@endpoint_url}"
12
- end
13
-
14
- def start
15
- super
16
- require 'net/http/persistent'
17
- @uri = URI @endpoint_url
18
- @http = Net::HTTP::Persistent.new 'fluent-plugin-logzio', :ENV
19
- @http.headers['Content-Type'] = 'application/json'
20
- end
21
-
22
- def shutdown
23
- super
24
- end
25
-
26
- def emit(tag, es, chain)
27
- chain.next
28
- es.each {|time,record|
29
- record['@timestamp'] ||= Time.at(time).iso8601(3) if @output_include_time
30
- record[@output_tags_fieldname] ||= tag.to_s if @output_include_tags
31
- record_json = Yajl.dump(record)
32
- log.debug "Record sent #{record_json}"
33
- post = Net::HTTP::Post.new @uri.request_uri
34
- post.body = record_json
35
- begin
36
- response = @http.request @uri, post
37
- log.debug "HTTP Response code #{response.code}"
38
- log.error response.body if response.code != '200'
39
- rescue StandardError
40
- log.error "Error connecting to logzio verify the url #{@endpoint_url}"
41
- end
42
- }
43
- end
44
- end
45
- end