-
Notifications
You must be signed in to change notification settings - Fork 165
WIP: LOG-1491:Vector config generator #1211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@vimalk78 This PR generates following simple config. This is just first version and there is 1-2 hard coding as of now like pipeline name. As discussed there might be some restructuring required in config.go so that pipeline names/ID can be passed to subsequent vector components.
|
@ajaygupta978 if this is a Work in progress, please add [WIP] to the beginning of PR title
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there is a bunch of info here that needs to be removed for the sake of it's not fluentd
31187b5
to
d6a4bbc
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ajaygupta978 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@vimalk78 @jcantrill
|
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to do this matching on CLF spec rather than the config we are trying to produce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok will take care.
d6a4bbc
to
81ec3dc
Compare
LOG-1491:Vector config generator LOG-1491:Vector config generator LOG-1491:Vector config generator
81ec3dc
to
cfcbe6f
Compare
@jcantrill @vimalk78 could you please review it? |
LOG-1491:Vector config generator
cfcbe6f
to
9dfc152
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There still appears to be a bunch of fluent conf here
|
||
func ConcatArrays(input []string) string { | ||
out := make([]string, len(input)) | ||
for i, a := range input { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the input is an array string and the output is a string, why the need to spin through the input instead of just strings.Join()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was required because each of the array element needed double quote.
inputs = ["pipeline1", "pipeline2"]
|
||
for _, source := range sources { | ||
|
||
if source.Type() == "journald" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make a constant
@@ -0,0 +1,36 @@ | |||
package vector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run make fmt
to fix formatting
instance = transform.JournalTransform{ | ||
SourceID: helpers.PipelineName("transform_" + source.Type()), | ||
SrcType: source.ComponentID(), | ||
InputPipeline: []string{"kubernetes_logs", helpers.PipelineName(source.Type())}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constant
[sinks.{{.StoreID}}] | ||
type = "elasticsearch" | ||
inputs = ` + helpers.ConcatArrays(e.InputPipeline) + ` | ||
endpoint = "{{.Host}}:{{.Port}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might this need a protocol?
return conf | ||
} | ||
|
||
func generateRubyDigArgs(path string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not ruby so not required
pipeline = "pipeline-name" | ||
compression = "none" | ||
auth.strategy = "basic" | ||
auth.user = "#{File.exists?('/var/run/ocp-collector/secrets/es-1/username') ? open('/var/run/ocp-collector/secrets/es-1/username','r') do |f|f.read end : ''}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will have to be some equivalent vector scripting not ruby
|
||
func (t TLS) Template() string { | ||
https := `{{define "elasticsearchTLSTemplate" -}} | ||
scheme https |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like fluentd conf
@ajaygupta978: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@ajaygupta978: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
this is duplicate of #1230 so closing this. |
Description
This PR generates configuration for vector log collector.
/cc @vimalk78
/assign @jcantrill