fluent-plugin-logzio 0.0.19 → 0.0.22
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/.github/workflows/git-secrets.yml +33 -0
- data/.whitesource +8 -0
- data/README.md +4 -0
- data/fluent-plugin-logzio.gemspec +5 -5
- data/lib/fluent/plugin/out_logzio_buffered.rb +18 -2
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6e13567cce456b4bf9efe5ec2fcc72d9ab50648
|
4
|
+
data.tar.gz: 9c92ef500e341c040349be13f9ac4d2ea8a3ea96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09062c96178f0d3b42b2e5c9ace511b029ae3508e3beca477916b80b806e83f6ccb15bf94ce52eabebc2cce3e5a10d4b1009cf0c26e13752259578dac0e35479'
|
7
|
+
data.tar.gz: b84d592569e502023fb318fbe2f1408a9049156740233ab67aeca0b0c0333a5c8ca39cf79eb641494fde4c9326fa28b65ae472feecea8724418243906dceed32
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: git-secrets
|
2
|
+
|
3
|
+
# Controls when the workflow will run
|
4
|
+
# Triggers the workflow on push or pull request events but only for the main branch
|
5
|
+
on: [push]
|
6
|
+
|
7
|
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
8
|
+
jobs:
|
9
|
+
# This workflow contains a single job called "main"
|
10
|
+
git-secrets:
|
11
|
+
# The type of runner that the job will run on
|
12
|
+
runs-on: ubuntu-18.04
|
13
|
+
|
14
|
+
# Steps represent a sequence of tasks that will be executed as part of the job
|
15
|
+
steps:
|
16
|
+
- name: Check Out Source Code
|
17
|
+
uses: actions/checkout@v2
|
18
|
+
|
19
|
+
- name: Set up Python 3.8
|
20
|
+
uses: actions/setup-python@v2
|
21
|
+
with:
|
22
|
+
python-version: 3.8
|
23
|
+
- name: Installing dependencies
|
24
|
+
run:
|
25
|
+
sudo apt-get install git less openssh-server
|
26
|
+
- name: Installing scanning tool
|
27
|
+
run: |
|
28
|
+
brew install git-secrets
|
29
|
+
git secrets --install
|
30
|
+
git secrets --register-aws
|
31
|
+
- name: Running scanning tool
|
32
|
+
run:
|
33
|
+
git secrets --scan
|
data/.whitesource
ADDED
data/README.md
CHANGED
@@ -71,9 +71,13 @@ This is an **example** only. Your needs in production may vary!
|
|
71
71
|
* **bulk_limit_warning_limit** Limit to the size of the Logz.io warning message when a record exceeds bulk_limit to prevent a recursion when Fluent warnings are sent to the Logz.io output. Defaults to nil (no truncation).
|
72
72
|
* **proxy_uri** Your proxy uri. Default is nil
|
73
73
|
* **proxy_cert** Your proxy cert. Default is nil
|
74
|
+
* **gzip** should the plugin ship the logs in gzip compression. Default is false
|
74
75
|
|
75
76
|
|
76
77
|
## Release Notes
|
78
|
+
- 0.0.22: Update gem `net-http-persistent` to 4.x.
|
79
|
+
- 0.0.21: Update gem `net-http-persistent` to 3.x.
|
80
|
+
- 0.0.20: Support gzip compression
|
77
81
|
- 0.0.18: Support proxy_uri and proxy_cert in the configuration file. Put logzio output plugin class under Fluent::Plugin module and thus work with multi workers.
|
78
82
|
- 0.0.17: Optional truncate log messages when they are exceeding bulk size in warning logs
|
79
83
|
- 0.0.16: More fluentD 1.0+ adjustments
|
@@ -4,9 +4,9 @@ $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.
|
8
|
-
s.authors = ['Yury Kotov', 'Roi Rav-Hon', 'Arcadiy Ivanov']
|
9
|
-
s.email = ['bairkan@gmail.com', 'roi@logz.io', 'arcadiy@ivanov.biz']
|
7
|
+
s.version = '0.0.22'
|
8
|
+
s.authors = ['Yury Kotov', 'Roi Rav-Hon', 'Arcadiy Ivanov', 'Miri Ignatiev']
|
9
|
+
s.email = ['bairkan@gmail.com', 'roi@logz.io', 'arcadiy@ivanov.biz', 'miri.ignatiev@logz.io']
|
10
10
|
s.homepage = 'https://github.com/logzio/fluent-plugin-logzio'
|
11
11
|
s.summary = %q{Fluentd plugin for output to Logz.io}
|
12
12
|
s.description = %q{Fluentd pluging (fluent.org) for output to Logz.io (logz.io)}
|
@@ -19,10 +19,10 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ['lib']
|
20
20
|
s.required_ruby_version = Gem::Requirement.new('>= 2.1.0')
|
21
21
|
|
22
|
-
s.add_dependency 'net-http-persistent', '~>
|
22
|
+
s.add_dependency 'net-http-persistent', '~> 4.0'
|
23
23
|
s.add_runtime_dependency 'fluentd', ['>= 0.14.0', '< 2']
|
24
24
|
s.add_development_dependency 'rake', '~> 12.3'
|
25
25
|
s.add_development_dependency 'bundler', '~> 1.16'
|
26
26
|
s.add_development_dependency 'rspec', '~> 3.7'
|
27
27
|
s.add_development_dependency 'test-unit', '~> 3.2'
|
28
|
-
end
|
28
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'time'
|
2
2
|
require 'fluent/plugin/output'
|
3
|
+
require 'zlib'
|
4
|
+
require 'stringio'
|
3
5
|
|
4
6
|
module Fluent::Plugin
|
5
7
|
class LogzioOutputBuffered < Output
|
@@ -18,6 +20,7 @@ module Fluent::Plugin
|
|
18
20
|
config_param :output_tags_fieldname, :string, default: 'fluentd_tags'
|
19
21
|
config_param :proxy_uri, :string, default: nil
|
20
22
|
config_param :proxy_cert, :string, default: nil
|
23
|
+
config_param :gzip, :bool, default: false # False for backward compatibility
|
21
24
|
|
22
25
|
def configure(conf)
|
23
26
|
super
|
@@ -41,8 +44,11 @@ module Fluent::Plugin
|
|
41
44
|
super
|
42
45
|
require 'net/http/persistent'
|
43
46
|
@uri = URI @endpoint_url
|
44
|
-
@http = Net::HTTP::Persistent.new 'fluent-plugin-logzio', :ENV
|
47
|
+
@http = Net::HTTP::Persistent.new name: 'fluent-plugin-logzio', proxy: :ENV
|
45
48
|
@http.headers['Content-Type'] = 'text/plain'
|
49
|
+
if @gzip
|
50
|
+
@http.headers['Content-Encoding'] = 'gzip'
|
51
|
+
end
|
46
52
|
@http.idle_timeout = @http_idle_timeout
|
47
53
|
@http.socket_options << [Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, 1]
|
48
54
|
|
@@ -122,7 +128,9 @@ module Fluent::Plugin
|
|
122
128
|
|
123
129
|
# Logz.io bulk http endpoint expecting log line with \n delimiter
|
124
130
|
post.body = bulk_records.join("\n")
|
125
|
-
|
131
|
+
if gzip
|
132
|
+
post.body = compress(post.body)
|
133
|
+
end
|
126
134
|
sleep_interval = @retry_sleep
|
127
135
|
|
128
136
|
begin
|
@@ -163,5 +171,13 @@ module Fluent::Plugin
|
|
163
171
|
log.error "Got unexpected exception! Here: #{e}"
|
164
172
|
end
|
165
173
|
end
|
174
|
+
|
175
|
+
def compress(string)
|
176
|
+
wio = StringIO.new("w")
|
177
|
+
w_gz = Zlib::GzipWriter.new(wio)
|
178
|
+
w_gz.write(string)
|
179
|
+
w_gz.close
|
180
|
+
wio.string
|
181
|
+
end
|
166
182
|
end
|
167
183
|
end
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-logzio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Kotov
|
8
8
|
- Roi Rav-Hon
|
9
9
|
- Arcadiy Ivanov
|
10
|
+
- Miri Ignatiev
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date:
|
14
|
+
date: 2022-06-19 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: net-http-persistent
|
@@ -18,14 +19,14 @@ dependencies:
|
|
18
19
|
requirements:
|
19
20
|
- - "~>"
|
20
21
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
22
|
+
version: '4.0'
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
25
|
version_requirements: !ruby/object:Gem::Requirement
|
25
26
|
requirements:
|
26
27
|
- - "~>"
|
27
28
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
29
|
+
version: '4.0'
|
29
30
|
- !ruby/object:Gem::Dependency
|
30
31
|
name: fluentd
|
31
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,12 +108,15 @@ email:
|
|
107
108
|
- bairkan@gmail.com
|
108
109
|
- roi@logz.io
|
109
110
|
- arcadiy@ivanov.biz
|
111
|
+
- miri.ignatiev@logz.io
|
110
112
|
executables: []
|
111
113
|
extensions: []
|
112
114
|
extra_rdoc_files: []
|
113
115
|
files:
|
116
|
+
- ".github/workflows/git-secrets.yml"
|
114
117
|
- ".gitignore"
|
115
118
|
- ".rspec"
|
119
|
+
- ".whitesource"
|
116
120
|
- Gemfile
|
117
121
|
- LICENSE
|
118
122
|
- README.md
|