Conversation
|
jenkins retest this |
36c49e6 to
4838798
Compare
It goes over all configured modules and runs them, reporting the resulting event to the user
|
jenkins retest this please |
andrewkroh
left a comment
There was a problem hiding this comment.
LGTM, I just left a few questions.
| } | ||
|
|
||
| // MetricSets return the list of metricsets of the module | ||
| func (mw *Wrapper) MetricSets() []*metricSetWrapper { |
There was a problem hiding this comment.
Can this return []mb.MetricSet instead? (Returning an unexported type from an exported method can be annoying to users.)
There was a problem hiding this comment.
That was my first though too, but then I would need to reimplement fetch, which is not a big deal but could cause issues when we add new metricset types, wdyt?
metricbeat/mb/module/wrapper.go
Outdated
|
|
||
| type reporter interface { | ||
| StartFetchTimer() | ||
| Done() <-chan struct{} |
There was a problem hiding this comment.
Would it make sense to embed mb.PushReporter in reporter rather than duplicating the method signatures?
There was a problem hiding this comment.
totally, thanks for the tip :)
by embedding `mb.PushReporter` in it
|
fixed conflicts with master, all tests passing now :) |
|
|
||
| config, err := b.BeatConfig() | ||
| if err != nil { | ||
| fmt.Fprintf(os.Stderr, "Error initializing beat: %s\n", err) |
There was a problem hiding this comment.
The three "Error initializing beat" message above might get confusing at some point.
There was a problem hiding this comment.
I merged the PR, this is minor and can be handled in a future PR.
There was a problem hiding this comment.
Yeah, as I have been adding new commands I feel the need for a common cmdline util to handle initialization and output
|
Removing needs_docs label because the command is documented here: https://www.elastic.co/guide/en/beats/metricbeat/master/command-line-options.html#test-command |
Add
metricbeat test modulescommand, it goes over all configured metricsets and runs them, reporting the result back to the user:Filtering by module and metricset:
TODO: