-
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
[Metricbeat] Add Zookeeper connections metricset #11070
[Metricbeat] Add Zookeeper connections metricset #11070
Conversation
jenkins, test this please |
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.
Thanks for adding this new metricset!
"period": "5s" | ||
}]) | ||
proc = self.start_beat() | ||
self.wait_until(lambda: self.output_lines() > 0) |
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.
Is there going to be always connections available to report?
Should we keep a connection with zookeeper open here to avoid flakiness?
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.
I don't follow you. If you want to change the behaviour of the module or the system tests it should go in a different PR, this is just to add a Metricset with the current behaviour and Cloud is waiting for it 😉
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.
If there is no connection to the zookeeper service, no event is generated and then this will fail. I was wondering if we should open a connection in the test to avoid flakiness because of that.
Nothing to change in the module, just maybe in the test.
If there is always going to be a connection here because of other reasons then you can ignore my comment 🙂
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.
Also this, if it is not failing now I think it won't fail, to be revisited if there are related flaky tests.
52ce129
to
17d2111
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.
Ups, forgot to hit submit after reviewing :-(
connections | ||
fields: | ||
- name: ip | ||
type: keyword |
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.
type: ip ?
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.
Now they are part of ECS as requested by Jaime
} else { | ||
m.checkRegexAndSetInt(metricsetFields, v, k, &oneParsingIsCorrect) | ||
} | ||
} |
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.
Could schema
be used here for these mappings?
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.
Lets leave this change for a follow up as this is blocking other things.
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.
Awesome, thanks Jaime!
|
||
if oneParsingIsCorrect { | ||
result = append(result, mb.Event{MetricSetFields: metricsetFields, RootFields: rootFields}) | ||
} |
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.
Should we log at least at the debug level if nothing parsed correctly?
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.
Good point!
} else { | ||
m.checkRegexAndSetInt(metricsetFields, v, k, &oneParsingIsCorrect) | ||
} | ||
} |
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.
Lets leave this change for a follow up as this is blocking other things.
"period": "5s" | ||
}]) | ||
proc = self.start_beat() | ||
self.wait_until(lambda: self.output_lines() > 0) |
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.
Also this, if it is not failing now I think it won't fail, to be revisited if there are related flaky tests.
Error seems unrelated. Merging |
Zookeeper connections Metricset parses the incoming information of
cons
4 letter command from Zookeeper and emit a single event for each connection that appears in the output.Relates to this #10475