fluent-plugin-out-http 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +8 -8
- data/.travis.yml +25 -25
- data/CHANGELOG.md +75 -72
- data/Gemfile +4 -4
- data/ISSUE_TEMPLATE.md +21 -21
- data/LICENSE.txt +11 -11
- data/README.md +47 -45
- data/Rakefile +11 -11
- data/fluent-plugin-out-http.gemspec +25 -25
- data/lib/fluent/plugin/out_http.rb +314 -297
- data/lib/fluent/test/http_output_test.rb +42 -42
- data/test/plugin/script/plugin/formatter_test.rb +21 -21
- data/test/plugin/test_out_http.rb +872 -771
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cae817126fdb00912368dea2552ab2fe2fb2b0034c056675ff5a202345a599e
|
4
|
+
data.tar.gz: d77eadf2e866560cab71071619ad7b16dfd7aa9795fefce92f313b2cdf8c4a94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46844c53ac9a7f508dda03612a77a897d8571f40b9ed3a59c341f008ad3c75bfcad7049692daa910f75210e878aaae0555ec392ffd57e3c95ce37a60e8ec8dbb
|
7
|
+
data.tar.gz: 817925c2db4173645f854ac1478b0ddd861dc7907b2919a8f24c6f8b5ffcba1d044a574eaf00e7ffc314d91d54ca37131e4633c763b63d0d971b0879f52e9099
|
data/.gitignore
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
*~
|
2
|
-
\#*
|
3
|
-
.\#*
|
4
|
-
*.gem
|
5
|
-
.bundle
|
6
|
-
.ruby-version
|
7
|
-
Gemfile.lock
|
8
|
-
vendor
|
1
|
+
*~
|
2
|
+
\#*
|
3
|
+
.\#*
|
4
|
+
*.gem
|
5
|
+
.bundle
|
6
|
+
.ruby-version
|
7
|
+
Gemfile.lock
|
8
|
+
vendor
|
data/.travis.yml
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
rvm:
|
2
|
-
- 2.2
|
3
|
-
- 2.3
|
4
|
-
- 2.4.5
|
5
|
-
- 2.5.3
|
6
|
-
- 2.6.0
|
7
|
-
- ruby-head
|
8
|
-
|
9
|
-
os:
|
10
|
-
- linux
|
11
|
-
- osx
|
12
|
-
|
13
|
-
dist: trusty
|
14
|
-
|
15
|
-
gemfile:
|
16
|
-
- Gemfile
|
17
|
-
|
18
|
-
before_install:
|
19
|
-
- gem update --system=2.7.8
|
20
|
-
|
21
|
-
script: bundle exec rake test
|
22
|
-
|
23
|
-
matrix:
|
24
|
-
allow_failures:
|
25
|
-
- rvm: ruby-head
|
1
|
+
rvm:
|
2
|
+
- 2.2
|
3
|
+
- 2.3
|
4
|
+
- 2.4.5
|
5
|
+
- 2.5.3
|
6
|
+
- 2.6.0
|
7
|
+
- ruby-head
|
8
|
+
|
9
|
+
os:
|
10
|
+
- linux
|
11
|
+
- osx
|
12
|
+
|
13
|
+
dist: trusty
|
14
|
+
|
15
|
+
gemfile:
|
16
|
+
- Gemfile
|
17
|
+
|
18
|
+
before_install:
|
19
|
+
- gem update --system=2.7.8
|
20
|
+
|
21
|
+
script: bundle exec rake test
|
22
|
+
|
23
|
+
matrix:
|
24
|
+
allow_failures:
|
25
|
+
- rvm: ruby-head
|
data/CHANGELOG.md
CHANGED
@@ -1,72 +1,75 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
## 1.3.
|
4
|
-
* Support
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
*
|
10
|
-
|
11
|
-
## 1.
|
12
|
-
*
|
13
|
-
|
14
|
-
## 1.1.
|
15
|
-
*
|
16
|
-
|
17
|
-
## 1.1.
|
18
|
-
*
|
19
|
-
|
20
|
-
## 1.1.
|
21
|
-
* Add
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
*
|
26
|
-
|
27
|
-
## 1.1.
|
28
|
-
*
|
29
|
-
|
30
|
-
## 1.1.
|
31
|
-
* Added
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
*
|
36
|
-
|
37
|
-
## 1.0
|
38
|
-
*
|
39
|
-
|
40
|
-
## 1.0.
|
41
|
-
*
|
42
|
-
|
43
|
-
## 0.
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
*
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
*
|
54
|
-
|
55
|
-
|
56
|
-
*
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
*
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
*
|
66
|
-
|
67
|
-
## 0.1.
|
68
|
-
* #
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
*
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 1.3.1
|
4
|
+
* Support compression request
|
5
|
+
|
6
|
+
## 1.3.0
|
7
|
+
* Support all private key types
|
8
|
+
* Recoverable error codes
|
9
|
+
* Bulk request with x-ndjson
|
10
|
+
|
11
|
+
## 1.2.0
|
12
|
+
* Support mutual authentication
|
13
|
+
|
14
|
+
## 1.1.7
|
15
|
+
* Fix dependent Fluentd version
|
16
|
+
|
17
|
+
## 1.1.6
|
18
|
+
* Pass chunk directly info built-in placeholder instead of chunk.metadata
|
19
|
+
|
20
|
+
## 1.1.5
|
21
|
+
* Add :raw serializer
|
22
|
+
|
23
|
+
## 1.1.4
|
24
|
+
* Add custom formatter feature
|
25
|
+
* Tweak Travis CI tasks
|
26
|
+
|
27
|
+
## 1.1.3
|
28
|
+
* Send query_string to endpoint_url
|
29
|
+
|
30
|
+
## 1.1.2
|
31
|
+
* Added custom headers feature
|
32
|
+
|
33
|
+
## 1.1.1
|
34
|
+
* Added plain text transport capability
|
35
|
+
* Added specify cacert file for ssl verify
|
36
|
+
|
37
|
+
## 1.1.0
|
38
|
+
* Support for jwt token authentication
|
39
|
+
|
40
|
+
## 1.0.1
|
41
|
+
* Added endpoint_url placeholder support
|
42
|
+
|
43
|
+
## 1.0.0
|
44
|
+
* Use Fluentd v1 API
|
45
|
+
|
46
|
+
## 0.2.0
|
47
|
+
### Added
|
48
|
+
* SSL is now supported if `endpoint_url` uses the `https` scheme (uses ruby-2.1 syntax internally)
|
49
|
+
* New config: set `ssl_no_verify` to `true` to bypass SSL certificate verification.
|
50
|
+
Use at your own risk.
|
51
|
+
### Changed
|
52
|
+
* Fixed tests:
|
53
|
+
* Removed some warnings
|
54
|
+
* Fixed failing binary test to use UTF-8
|
55
|
+
### Removed
|
56
|
+
* Dropped support of Ruby 1.9-2.0
|
57
|
+
|
58
|
+
## 0.1.4
|
59
|
+
* #11 Updated Fluentd dependency to: [">= 0.10.0", "< 2"]
|
60
|
+
* #10 `password` is now marked as a [secret option](https://github.com/fluent/fluentd/pull/604)
|
61
|
+
|
62
|
+
## 0.1.3
|
63
|
+
* Added a new configuration option: `raise_on_error` (default: true)
|
64
|
+
* In order to let the plugin raise exceptions like it did in 0.1.1: keep using your configuration as-is
|
65
|
+
* In order to suppress all exceptions: add `raise_on_error false` to your configuration
|
66
|
+
|
67
|
+
## 0.1.2
|
68
|
+
* #6 Catch all `StandardError`s during HTTP request to prevent td-agent from freezing
|
69
|
+
|
70
|
+
## 0.1.1
|
71
|
+
* #2 Use yajl instead of json as json serializer
|
72
|
+
* #1 Fix a bug where a nil HTTP response caused the plugin to stop working
|
73
|
+
|
74
|
+
## 0.1.0
|
75
|
+
* Initial release
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in fluent-plugin-out-http.gemspec
|
4
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fluent-plugin-out-http.gemspec
|
4
|
+
gemspec
|
data/ISSUE_TEMPLATE.md
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
#### Problem
|
2
|
-
|
3
|
-
...
|
4
|
-
|
5
|
-
#### Steps to replicate
|
6
|
-
|
7
|
-
Provide example config and message
|
8
|
-
|
9
|
-
#### Expected Behavior or What you need to ask
|
10
|
-
|
11
|
-
...
|
12
|
-
|
13
|
-
#### Using Fluentd and out_http plugin versions
|
14
|
-
|
15
|
-
* OS version
|
16
|
-
* Fluentd v0.12 or v0.14/v1.0
|
17
|
-
* paste result of ``fluentd --version`` or ``td-agent --version``
|
18
|
-
* out_http plugin 1.x.y or 0.x.y
|
19
|
-
* paste boot log of fluentd or td-agent
|
20
|
-
* paste result of ``fluent-gem list``, ``td-agent-gem list`` or your Gemfile.lock
|
21
|
-
* Bear Metal or Within Docker or Kubernetes or others? (optional)
|
1
|
+
#### Problem
|
2
|
+
|
3
|
+
...
|
4
|
+
|
5
|
+
#### Steps to replicate
|
6
|
+
|
7
|
+
Provide example config and message
|
8
|
+
|
9
|
+
#### Expected Behavior or What you need to ask
|
10
|
+
|
11
|
+
...
|
12
|
+
|
13
|
+
#### Using Fluentd and out_http plugin versions
|
14
|
+
|
15
|
+
* OS version
|
16
|
+
* Fluentd v0.12 or v0.14/v1.0
|
17
|
+
* paste result of ``fluentd --version`` or ``td-agent --version``
|
18
|
+
* out_http plugin 1.x.y or 0.x.y
|
19
|
+
* paste boot log of fluentd or td-agent
|
20
|
+
* paste result of ``fluent-gem list``, ``td-agent-gem list`` or your Gemfile.lock
|
21
|
+
* Bear Metal or Within Docker or Kubernetes or others? (optional)
|
data/LICENSE.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
2
|
-
you may not use this file except in compliance with the License.
|
3
|
-
You may obtain a copy of the License at
|
4
|
-
|
5
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
6
|
-
|
7
|
-
Unless required by applicable law or agreed to in writing, software
|
8
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
-
See the License for the specific language governing permissions and
|
11
|
-
limitations under the License.
|
1
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
2
|
+
you may not use this file except in compliance with the License.
|
3
|
+
You may obtain a copy of the License at
|
4
|
+
|
5
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
See the License for the specific language governing permissions and
|
11
|
+
limitations under the License.
|
data/README.md
CHANGED
@@ -1,45 +1,47 @@
|
|
1
|
-
# fluent-plugin-out-http, a plugin for [Fluentd](http://fluentd.org)
|
2
|
-
|
3
|
-
A generic [fluentd][1] output plugin for sending logs to an HTTP endpoint.
|
4
|
-
|
5
|
-
[![Build Status](https://travis-ci.org/fluent-plugins-nursery/fluent-plugin-out-http.svg?branch=master)](https://travis-ci.org/fluent-plugins-nursery/fluent-plugin-out-http)
|
6
|
-
|
7
|
-
## Configuration options
|
8
|
-
|
9
|
-
<match *>
|
10
|
-
@type http
|
11
|
-
endpoint_url http://localhost.local/api/
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
token tokent # default: ''
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
[
|
1
|
+
# fluent-plugin-out-http, a plugin for [Fluentd](http://fluentd.org)
|
2
|
+
|
3
|
+
A generic [fluentd][1] output plugin for sending logs to an HTTP endpoint.
|
4
|
+
|
5
|
+
[![Build Status](https://travis-ci.org/fluent-plugins-nursery/fluent-plugin-out-http.svg?branch=master)](https://travis-ci.org/fluent-plugins-nursery/fluent-plugin-out-http)
|
6
|
+
|
7
|
+
## Configuration options
|
8
|
+
|
9
|
+
<match *>
|
10
|
+
@type http
|
11
|
+
endpoint_url http://localhost.local/api/
|
12
|
+
ssl_no_verify false # default: false
|
13
|
+
http_method put # default: post
|
14
|
+
serializer json # default: form
|
15
|
+
rate_limit_msec 100 # default: 0 = no rate limiting
|
16
|
+
raise_on_error false # default: true
|
17
|
+
recoverable_status_codes 503, 400 # default: 503
|
18
|
+
cacert_file /etc/ssl/endpoint1.cert # default: ''
|
19
|
+
client_cert_path /path/to/client_cert.crt # default: ''
|
20
|
+
private_key_path /path/to/private_key.key # default: ''
|
21
|
+
private_key_passphrase yourpassphrase # default: ''
|
22
|
+
custom_headers {"token":"arbitrary"} # default: nil
|
23
|
+
authentication basic # default: none
|
24
|
+
username alice # default: ''
|
25
|
+
password bobpop # default: '', secret: true
|
26
|
+
token tokent # default: ''
|
27
|
+
buffered true # default: false. Switch non-buffered/buffered mode
|
28
|
+
bulk_request false # default: false. Send events as application/x-ndjson
|
29
|
+
compress_request true # default: false. Send compressed events
|
30
|
+
</match>
|
31
|
+
|
32
|
+
## Usage notes
|
33
|
+
|
34
|
+
If you'd like to retry failed requests, consider using [fluent-plugin-bufferize][3].
|
35
|
+
Or, specify appropriate `recoverable_status_codes` parameter.
|
36
|
+
|
37
|
+
To send events with bulk_request, you should specify `bulk_request` as `true`
|
38
|
+
Note that when this parameter as `true`, Fluentd always send events as `application/x-ndjson`.
|
39
|
+
Currently, `application/x-ndjson` is only supported MIME type for bulk_request.
|
40
|
+
|
41
|
+
----
|
42
|
+
|
43
|
+
Heavily based on [fluent-plugin-growthforecast][2]
|
44
|
+
|
45
|
+
[1]: http://fluentd.org/
|
46
|
+
[2]: https://github.com/tagomoris/fluent-plugin-growthforecast
|
47
|
+
[3]: https://github.com/sabottenda/fluent-plugin-bufferize
|
data/Rakefile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
require "bundler/gem_tasks"
|
3
|
-
|
4
|
-
require 'rake/testtask'
|
5
|
-
Rake::TestTask.new(:test) do |test|
|
6
|
-
test.libs << 'lib' << 'test'
|
7
|
-
test.pattern = 'test/**/test_*.rb'
|
8
|
-
test.verbose = true
|
9
|
-
end
|
10
|
-
|
11
|
-
task :default => :test
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
|
4
|
+
require 'rake/testtask'
|
5
|
+
Rake::TestTask.new(:test) do |test|
|
6
|
+
test.libs << 'lib' << 'test'
|
7
|
+
test.pattern = 'test/**/test_*.rb'
|
8
|
+
test.verbose = true
|
9
|
+
end
|
10
|
+
|
11
|
+
task :default => :test
|
@@ -1,25 +1,25 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
Gem::Specification.new do |gem|
|
4
|
-
gem.name = "fluent-plugin-out-http"
|
5
|
-
gem.version = "1.3.
|
6
|
-
gem.authors = ["Marica Odagaki"]
|
7
|
-
gem.email = ["ento.entotto@gmail.com"]
|
8
|
-
gem.summary = %q{A generic Fluentd output plugin to send logs to an HTTP endpoint}
|
9
|
-
gem.description = gem.summary
|
10
|
-
gem.homepage = "https://github.com/fluent-plugins-nursery/fluent-plugin-out-http"
|
11
|
-
gem.licenses = ["Apache-2.0"]
|
12
|
-
|
13
|
-
gem.files = `git ls-files`.split($\)
|
14
|
-
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
15
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
16
|
-
gem.require_paths = ["lib"]
|
17
|
-
|
18
|
-
gem.required_ruby_version = '>= 2.1.0'
|
19
|
-
|
20
|
-
gem.add_runtime_dependency "yajl-ruby", "~> 1.0"
|
21
|
-
gem.add_runtime_dependency "fluentd", [">= 0.14.22", "< 2"]
|
22
|
-
gem.add_development_dependency "bundler"
|
23
|
-
gem.add_development_dependency "rake"
|
24
|
-
gem.add_development_dependency "test-unit", ">= 3.1.0"
|
25
|
-
end
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = "fluent-plugin-out-http"
|
5
|
+
gem.version = "1.3.1"
|
6
|
+
gem.authors = ["Marica Odagaki"]
|
7
|
+
gem.email = ["ento.entotto@gmail.com"]
|
8
|
+
gem.summary = %q{A generic Fluentd output plugin to send logs to an HTTP endpoint}
|
9
|
+
gem.description = gem.summary
|
10
|
+
gem.homepage = "https://github.com/fluent-plugins-nursery/fluent-plugin-out-http"
|
11
|
+
gem.licenses = ["Apache-2.0"]
|
12
|
+
|
13
|
+
gem.files = `git ls-files`.split($\)
|
14
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
15
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
16
|
+
gem.require_paths = ["lib"]
|
17
|
+
|
18
|
+
gem.required_ruby_version = '>= 2.1.0'
|
19
|
+
|
20
|
+
gem.add_runtime_dependency "yajl-ruby", "~> 1.0"
|
21
|
+
gem.add_runtime_dependency "fluentd", [">= 0.14.22", "< 2"]
|
22
|
+
gem.add_development_dependency "bundler"
|
23
|
+
gem.add_development_dependency "rake"
|
24
|
+
gem.add_development_dependency "test-unit", ">= 3.1.0"
|
25
|
+
end
|