Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fluent-plugin-wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
fluent-plugin-wendelin
Commits
1ddcfa95
Commit
1ddcfa95
authored
Jan 21, 2020
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port to fluentd-1.0
parent
8702c866
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
lib/fluent/plugin/out_wendelin.rb
lib/fluent/plugin/out_wendelin.rb
+18
-11
No files found.
lib/fluent/plugin/out_wendelin.rb
View file @
1ddcfa95
...
@@ -19,14 +19,14 @@
...
@@ -19,14 +19,14 @@
# This plugin hooks into Fluentd in a way similiar to out_forward and
# This plugin hooks into Fluentd in a way similiar to out_forward and
# out_secure_forward and outputs event stream to a Wendelin HTTP endpoint.
# out_secure_forward and outputs event stream to a Wendelin HTTP endpoint.
require
'fluent/output'
require
'fluent/
plugin/
output'
require_relative
'wendelin_client'
require_relative
'wendelin_client'
module
Fluent
module
Fluent
::Plugin
class
WendelinOutput
<
O
bjectBufferedOutput
# XXX verify base class
class
WendelinOutput
<
O
utput
Plugin
.
register_output
(
'wendelin'
,
self
)
Fluent
::
Plugin
.
register_output
(
'wendelin'
,
self
)
# where Wendelin's Input Stream Tool is located,
# where Wendelin's Input Stream Tool is located,
# ex http://example.com/erp5/portal_ingestion_policies/example_ingestion
# ex http://example.com/erp5/portal_ingestion_policies/example_ingestion
...
@@ -45,9 +45,17 @@ module Fluent
...
@@ -45,9 +45,17 @@ module Fluent
config_param
:read_timeout
,
:integer
,
:default
=>
60
config_param
:read_timeout
,
:integer
,
:default
=>
60
config_param
:keep_alive_timeout
,
:integer
,
:default
=>
300
config_param
:keep_alive_timeout
,
:integer
,
:default
=>
300
config_section
:buffer
do
config_set_default
:chunk_keys
,
[
"tag"
]
end
def
configure
(
conf
)
def
configure
(
conf
)
super
super
unless
@chunk_key_tag
raise
Fluent
::
ConfigError
,
"buffer chunk key must include 'tag' for wendelin output"
end
credentials
=
{}
credentials
=
{}
if
@user
if
@user
credentials
[
'user'
]
=
@user
credentials
[
'user'
]
=
@user
...
@@ -68,12 +76,11 @@ module Fluent
...
@@ -68,12 +76,11 @@ module Fluent
# TODO
# TODO
end
end
# Use normal "Synchronous Buffer" - write out records from a buffer chunk for a tag.
# hooked to ObjectBufferedOutput - write out records from a buffer chunk for a tag.
#
#
# NOTE this is called from a separate thread (see OutputThread and BufferedOutput
)
def
write
(
chunk
)
def
write_objects
(
tag
,
chunk
)
return
if
chunk
.
empty?
# NOTE if this fail and raises -> it will unroll to
Buffered
Output#try_flush
# NOTE if this fail and raises -> it will unroll to Output#try_flush
# which detects errors and retries outputting logs up to retry maxcount
# which detects errors and retries outputting logs up to retry maxcount
# times and aborts outputting current logs if all try fail.
# times and aborts outputting current logs if all try fail.
#
#
...
@@ -86,7 +93,7 @@ module Fluent
...
@@ -86,7 +93,7 @@ module Fluent
# for input_stream_ref use tag as-is - it will be processed/translated
# for input_stream_ref use tag as-is - it will be processed/translated
# further on server by Wendelin
# further on server by Wendelin
reference
=
tag
reference
=
chunk
.
metadata
.
tag
if
@use_keep_alive
if
@use_keep_alive
@wendelin
.
ingest_with_keep_alive
(
reference
,
data_chunk
)
@wendelin
.
ingest_with_keep_alive
(
reference
,
data_chunk
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment