Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
metadata-collect-agent
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
Xiaowu Zhang
metadata-collect-agent
Commits
f4b69262
Commit
f4b69262
authored
May 31, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use portal ingestion
parent
edfcd6d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
dracut.module/90metadata-collect/flb.conf
dracut.module/90metadata-collect/flb.conf
+3
-3
src/go_plugin/out_gstdout.go
src/go_plugin/out_gstdout.go
+2
-1
No files found.
dracut.module/90metadata-collect/flb.conf
View file @
f4b69262
...
...
@@ -7,9 +7,9 @@
[
output
]
name
wendelin_fluentbit
match
*
streamtool_uri
https
://
softinst14
0097
.
host
.
vifib
.
net
/
erp5
user
xx
password
xx
streamtool_uri
https
://
softinst14
3932
.
host
.
vifib
.
net
/
erp5
/
portal_ingestion_policies
/
default
user
zope
password
pskmtwfn
buffer_type
memory
flush_interval
60
s
disable_retry_limit
true
src/go_plugin/out_gstdout.go
View file @
f4b69262
...
...
@@ -87,6 +87,7 @@ func FLBPluginFlushCtx(ctx, data unsafe.Pointer, length C.int, tag *C.char) int
//body result
// content type "application/octet-stream"
//
fmt
.
Printf
(
result
)
var
b
=
[]
byte
(
result
)
uri
:=
fmt
.
Sprintf
(
"%s/ingest?reference=#%s"
,
dict
[
"streamtool_uri"
],
C
.
GoString
(
tag
))
client
:=
&
http
.
Client
{}
...
...
@@ -98,7 +99,7 @@ func FLBPluginFlushCtx(ctx, data unsafe.Pointer, length C.int, tag *C.char) int
req
.
SetBasicAuth
(
dict
[
"user"
],
dict
[
"password"
])
req
.
Header
.
Set
(
"Content-Type"
,
"application/octet-stream"
)
rsp
,
_
:=
client
.
Do
(
req
)
if
rsp
.
StatusCode
!=
http
.
StatusOK
{
if
rsp
.
StatusCode
!=
204
{
fmt
.
Printf
(
"status code %d"
,
rsp
.
StatusCode
)
return
output
.
FLB_RETRY
}
...
...
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