-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Journalbeat: add index option to input #15071
Conversation
procs.List = append(procs.List, p) | ||
} | ||
|
||
func (procs *Processors) AddProcessors(p Processors) { |
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.
exported method Processors.AddProcessors should have comment or be unexported
@@ -103,10 +103,25 @@ func New(config PluginConfig) (*Processors, error) { | |||
return procs, nil | |||
} | |||
|
|||
func (procs *Processors) add(p Processor) { | |||
func (procs *Processors) AddProcessor(p Processor) { |
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.
exported method Processors.AddProcessor should have comment or be unexported
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 great!
Travis CI is green. Jenkins CI failures are unrelated. Merging. |
* Refactoring: renaming var to avoid collision * Refactoring: extract function * Refactoring: moving AddFormattedIndex processor into libbeat * Add constructor for addFormattedIndex processor * Export processor struct * Add comment for exported constructor * Adding comment for exported method * Adding index option to doc * Refactoring: extracting common code * Adding unit tests * Adding godoc for exported methods
Resolves #15063.
Building on top of the work @faec did in #14010, this PR allows Journalbeat inputs to take a new option,
index
. The value of this option determines which Elasticsearch index should be used by the Elasticsearch output for indexing Journalbeat events produced by that input. For other outputs, the index name is passed via the@metadata["raw_index"]
field.For example, with this
journalbeat.yml
configuration:Running
journalbeat -e
will result in events like: