-
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
Align kibana index generation to beats standard. #5290
Conversation
simitt
commented
Oct 2, 2017
- Move generator script to dev-tools.
- Add NewGenerator method which returns struct instead of init method.
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.
LGTM
func (i *Index) Create() ([]string, error) { | ||
indices := []string{} | ||
// Create an instance of the Kibana Index Pattern Generator | ||
func NewGenerator(indexName, beatName, beatDir, version string) (IndexPatternGenerator, error) { |
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.
We normally return a reference here, this also make it possible to return nil, err
on line 28.
libbeat/kibana/transform.go
Outdated
keys common.MapStr | ||
} | ||
|
||
func NewTransformer(timeFieldName, title string, fields common.Fields) Transformer { |
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.
Same comment as above that we could return a reference. Didn't check if it is required in this case. It seems to work just fine :-)
ab64950
to
fcfe481
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.
WFG
* Move generator script to dev-tools. * Add NewGenerator method which returns struct instead of init method.
fcfe481
to
286399b
Compare