Skip to content
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

WIP Generate fields, dashboards, config from mage #8609

Closed

Conversation

andrewkroh
Copy link
Member

IN PROGRESS

Generate the fields, dashboards, and config files from mage to make it reusable across Beats (include x-pack). This allows x-pack/filebeat to generate its own unique fields, dashboards, and config.

@andrewkroh andrewkroh added the in progress Pull request is currently in progress. label Oct 13, 2018
package include

import (
_ "github.com/elastic/beats/x-pack/filebeat/module/suricata"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a blank import should be only in a main or test package, or have a comment justifying it

numDashes /= 2
return strings.Repeat("-", numDashes)
}
func GenerateModuleReferenceConfig(out string, moduleDirs ...string) error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function GenerateModuleReferenceConfig should have comment or be unexported

Generate the fields, dashboards, and config files from mage to make it reusable across Beats (include x-pack). This allows x-pack/filebeat to generate its own unique fields, dashboards, and config.
@@ -82,10 +83,22 @@ func UseElasticBeatWithoutXPackPackaging() {
}
}

func LoadLocalNamedSpec(name string) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function LoadLocalNamedSpec should have comment or be unexported

return assetCmd()
}

func GenerateModuleFieldsGo() error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function GenerateModuleFieldsGo should have comment or be unexported

return generateFieldsYAML(OSSBeatDir(), moduleDirs...)
}

func OSSBeatDir(path ...string) string {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function OSSBeatDir should have comment or be unexported

import (
"github.com/elastic/beats/filebeat/cmd"

_ "github.com/elastic/beats/x-pack/filebeat/include"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a blank import should be only in a main or test package, or have a comment justifying it

@andrewkroh
Copy link
Member Author

Closing in favor of #8615 which is less ambitious in that it only tries to affect x-pack/filebeat for 6.x.

@andrewkroh andrewkroh closed this Oct 14, 2018
@andrewkroh andrewkroh deleted the feature-suricata branch November 8, 2018 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Pull request is currently in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants