fluent-plugin-out-http 1.2.0 → 1.3.0
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 +72 -67
- data/Gemfile +4 -4
- data/ISSUE_TEMPLATE.md +21 -21
- data/LICENSE.txt +11 -11
- data/README.md +45 -38
- data/Rakefile +11 -11
- data/fluent-plugin-out-http.gemspec +25 -25
- data/lib/fluent/plugin/out_http.rb +297 -246
- 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 +771 -732
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 989c7bd908f00d41020da757cd5b12f375170f7bb12b9faedcde1daaf7f49aa3
|
4
|
+
data.tar.gz: ef2d8107daa801ce5c6d7be6b50a70295f2ee8c93cf499eee9488a45a9829878
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b9fa63c1aa973a067cc24843dee44bf51463285630884805981bd16fa53a99883f0cbd661e4d1b0c57e6e3504432ea657ecd6425176a36cc0c0bbeb0604a81e
|
7
|
+
data.tar.gz: 6251827342e0819de611353945391476c1bb3257e2eef4e35861ae4452dbe833c5a975e0954e3456b77a81e5d91dde820632ce175d89cce32756d1053dcd74da
|
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,67 +1,72 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
## 1.
|
4
|
-
* Support
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
*
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
*
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
## 0.1.
|
60
|
-
*
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 1.3.0
|
4
|
+
* Support all private key types
|
5
|
+
* Recoverable error codes
|
6
|
+
* Bulk request with x-ndjson
|
7
|
+
|
8
|
+
## 1.2.0
|
9
|
+
* Support mutual authentication
|
10
|
+
|
11
|
+
## 1.1.7
|
12
|
+
* Fix dependent Fluentd version
|
13
|
+
|
14
|
+
## 1.1.6
|
15
|
+
* Pass chunk directly info built-in placeholder instead of chunk.metadata
|
16
|
+
|
17
|
+
## 1.1.5
|
18
|
+
* Add :raw serializer
|
19
|
+
|
20
|
+
## 1.1.4
|
21
|
+
* Add custom formatter feature
|
22
|
+
* Tweak Travis CI tasks
|
23
|
+
|
24
|
+
## 1.1.3
|
25
|
+
* Send query_string to endpoint_url
|
26
|
+
|
27
|
+
## 1.1.2
|
28
|
+
* Added custom headers feature
|
29
|
+
|
30
|
+
## 1.1.1
|
31
|
+
* Added plain text transport capability
|
32
|
+
* Added specify cacert file for ssl verify
|
33
|
+
|
34
|
+
## 1.1.0
|
35
|
+
* Support for jwt token authentication
|
36
|
+
|
37
|
+
## 1.0.1
|
38
|
+
* Added endpoint_url placeholder support
|
39
|
+
|
40
|
+
## 1.0.0
|
41
|
+
* Use Fluentd v1 API
|
42
|
+
|
43
|
+
## 0.2.0
|
44
|
+
### Added
|
45
|
+
* SSL is now supported if `endpoint_url` uses the `https` scheme (uses ruby-2.1 syntax internally)
|
46
|
+
* New config: set `ssl_no_verify` to `true` to bypass SSL certificate verification.
|
47
|
+
Use at your own risk.
|
48
|
+
### Changed
|
49
|
+
* Fixed tests:
|
50
|
+
* Removed some warnings
|
51
|
+
* Fixed failing binary test to use UTF-8
|
52
|
+
### Removed
|
53
|
+
* Dropped support of Ruby 1.9-2.0
|
54
|
+
|
55
|
+
## 0.1.4
|
56
|
+
* #11 Updated Fluentd dependency to: [">= 0.10.0", "< 2"]
|
57
|
+
* #10 `password` is now marked as a [secret option](https://github.com/fluent/fluentd/pull/604)
|
58
|
+
|
59
|
+
## 0.1.3
|
60
|
+
* Added a new configuration option: `raise_on_error` (default: true)
|
61
|
+
* In order to let the plugin raise exceptions like it did in 0.1.1: keep using your configuration as-is
|
62
|
+
* In order to suppress all exceptions: add `raise_on_error false` to your configuration
|
63
|
+
|
64
|
+
## 0.1.2
|
65
|
+
* #6 Catch all `StandardError`s during HTTP request to prevent td-agent from freezing
|
66
|
+
|
67
|
+
## 0.1.1
|
68
|
+
* #2 Use yajl instead of json as json serializer
|
69
|
+
* #1 Fix a bug where a nil HTTP response caused the plugin to stop working
|
70
|
+
|
71
|
+
## 0.1.0
|
72
|
+
* 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,38 +1,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
|
-
http_method put # default: post
|
13
|
-
serializer json # default: form
|
14
|
-
rate_limit_msec 100 # default: 0 = no rate limiting
|
15
|
-
raise_on_error false # default: true
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
+
http_method put # default: post
|
13
|
+
serializer json # default: form
|
14
|
+
rate_limit_msec 100 # default: 0 = no rate limiting
|
15
|
+
raise_on_error false # default: true
|
16
|
+
recoverable_status_codes 503, 400 # default: 503
|
17
|
+
authentication basic # default: none
|
18
|
+
username alice # default: ''
|
19
|
+
password bobpop # default: '', secret: true
|
20
|
+
buffered true # default: false. Switch non-buffered/buffered mode
|
21
|
+
bulk_request false # default: false. Send events as application/x-ndjson
|
22
|
+
cacert_file /etc/ssl/endpoint1.cert # default: ''
|
23
|
+
client_cert_path /path/to/client_cert.crt # default: ''
|
24
|
+
private_key_path /path/to/private_key.key # default: ''
|
25
|
+
private_key_passphrase yourpassphrase # default: ''
|
26
|
+
token tokent # default: ''
|
27
|
+
custom_headers {"token":"arbitrary"} # default: nil
|
28
|
+
</match>
|
29
|
+
|
30
|
+
## Usage notes
|
31
|
+
|
32
|
+
If you'd like to retry failed requests, consider using [fluent-plugin-bufferize][3].
|
33
|
+
Or, specify appropriate `recoverable_status_codes` parameter.
|
34
|
+
|
35
|
+
To send events with bulk_request, you should specify `bulk_request` as `true`
|
36
|
+
Note that when this parameter as `true`, Fluentd always send events as `application/x-ndjson`.
|
37
|
+
Currently, `application/x-ndjson` is only supported MIME type for bulk_request.
|
38
|
+
|
39
|
+
----
|
40
|
+
|
41
|
+
Heavily based on [fluent-plugin-growthforecast][2]
|
42
|
+
|
43
|
+
[1]: http://fluentd.org/
|
44
|
+
[2]: https://github.com/tagomoris/fluent-plugin-growthforecast
|
45
|
+
[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.
|
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.0"
|
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
|