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

Add secondary source of modules to Metricbeat to read light modules #12465

Merged
merged 40 commits into from
Jun 24, 2019
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c100145
Add light modules registry
jsoriano May 24, 2019
8ba9a38
Revert changes in current registry
jsoriano May 31, 2019
758afb2
Add light modules to registry
jsoriano May 31, 2019
0a6b190
Correctly override defaults
jsoriano Jun 1, 2019
c181e51
Add tests
jsoriano Jun 2, 2019
4ceab7b
Refactor module parsing
jsoriano Jun 3, 2019
3a1768e
Add Light modules support as a metricbeat option
jsoriano Jun 3, 2019
5f85188
Refactor metricset config reader for coherence with module config reader
jsoriano Jun 6, 2019
e23df08
Call module factories if registered
jsoriano Jun 6, 2019
c138347
Refactor base module creation for better error handling
jsoriano Jun 6, 2019
ae9c7e2
Add godocs
jsoriano Jun 6, 2019
d64ccb1
Add changelog entry
jsoriano Jun 6, 2019
b53acb3
Rename child register to secondary source and read to load
jsoriano Jun 7, 2019
1e9272c
Rename some internal variables to more meaningful names
jsoriano Jun 7, 2019
a25ec8c
Yet another refactor to simplify signatures
jsoriano Jun 7, 2019
0135353
Explictly check for module presence
jsoriano Jun 7, 2019
8b8521a
Recover test for existence of module
jsoriano Jun 7, 2019
29c55b2
Add context to some errors
jsoriano Jun 7, 2019
8652a0c
Fix beater
jsoriano Jun 7, 2019
db6d303
Remove references to child registry
jsoriano Jun 7, 2019
ae9e00f
Add PR reference to the changelog
jsoriano Jun 7, 2019
3f3d046
Fix test
jsoriano Jun 7, 2019
6af6437
Move light modules to x-pack
jsoriano Jun 12, 2019
af38b6b
Make hound CI happy
jsoriano Jun 12, 2019
6f38790
Make metricbeat modules test work with licensed metricbeat
jsoriano Jun 12, 2019
2af1d4c
Add missing license header
jsoriano Jun 12, 2019
49f5648
Merge remote-tracking branch 'origin/master' into metricbeat-light-mo…
jsoriano Jun 12, 2019
8722e1a
Add some sanity tests for the light metric set
jsoriano Jun 12, 2019
6bfb015
Add check for error in test
jsoriano Jun 12, 2019
53bbabd
Rename x-pack creator
jsoriano Jun 13, 2019
a70c415
Typo that caused failing test
jsoriano Jun 13, 2019
9a6c336
Add suggestions from review
jsoriano Jun 14, 2019
edcd41b
Merge remote-tracking branch 'origin/master' into metricbeat-light-mo…
jsoriano Jun 14, 2019
38ee770
Properly add the test options to x-pack metricbeat command
jsoriano Jun 14, 2019
724f41a
Use secondary source stringer to print light modules
jsoriano Jun 20, 2019
84cba87
Move metricbeat creator definitions to where they are used
jsoriano Jun 21, 2019
9e2cdb8
Add module names to base module override error
jsoriano Jun 21, 2019
d701bff
Move test cases to map with titles as key
jsoriano Jun 21, 2019
b3dbfda
Fix unsafe base module config override
jsoriano Jun 21, 2019
f175eb5
Add test for custom period
jsoriano Jun 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make hound CI happy
  • Loading branch information
jsoriano committed Jun 12, 2019
commit af38b6b171539b9e933c1785cf1bf6e113d6dc8d
1 change: 1 addition & 0 deletions metricbeat/cmd/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/elastic/beats/libbeat/cmd"
)

// BuildModulesManager adds support for modules management to a beat
func BuildModulesManager(beat *beat.Beat) (cmd.ModulesManager, error) {
jsoriano marked this conversation as resolved.
Show resolved Hide resolved
jsoriano marked this conversation as resolved.
Show resolved Hide resolved
jsoriano marked this conversation as resolved.
Show resolved Hide resolved
Copy link

Choose a reason for hiding this comment

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

nit: naming. cmd.ModulesManager is somewhat generic. Consider naming the constructor based on what is going to be constructed/initialized. For example NewLightweightModulesManager?

Copy link
Member Author

Choose a reason for hiding this comment

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

The only change made here is to make this method public so it can be used from x-pack, cmd.ModulesManager is the generic manager for modules subcommand.

Copy link

Choose a reason for hiding this comment

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

Yeah, I noticed this symbol becoming public here. But with it becoming public, the descriptive nature of the names used is even more important (a.k.a naming is hard).

config := beat.BeatConfig

Expand Down