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

[Metricbeat] Migrate Kubernetes state_pod Metricset to use ReporterV2 interface #10973

Merged

Conversation

sayden
Copy link
Contributor

@sayden sayden commented Feb 27, 2019

Refer to #10774 for more info

@sayden sayden added Metricbeat Metricbeat Team:Integrations Label for the Integrations team labels Feb 27, 2019
@sayden sayden self-assigned this Feb 27, 2019
@sayden sayden requested a review from a team as a code owner February 27, 2019 19:45
@sayden sayden changed the title [Metricbeat] Migrate Kubernetes state_node Metricset to use ReporterV2 interface [Metricbeat] Migrate Kubernetes state_pod Metricset to use ReporterV2 interface Feb 27, 2019
@sayden
Copy link
Contributor Author

sayden commented Feb 28, 2019

jenkins, test this

@sayden
Copy link
Contributor Author

sayden commented Mar 1, 2019

@sayden sayden added review [zube]: In Progress in progress Pull request is currently in progress. and removed review labels Mar 1, 2019
@sayden sayden force-pushed the migration/mb/reporterv2/kubernetes/state_pod branch from 1e4bb79 to 0958d7b Compare March 13, 2019 10:39
@sayden sayden requested a review from a team as a code owner March 13, 2019 10:39
@sayden
Copy link
Contributor Author

sayden commented Mar 13, 2019

After last push, error is related. Checking

@sayden
Copy link
Contributor Author

sayden commented Mar 13, 2019

I'm not sure if state_pod_test.go unit test can be removed already that we are using the new testing framework. @ruflin you are the one who knows better what's covered by it, could you confirm or not my guess?

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

I have added some comments, I hope they help.

},
"kubernetes": {
"pod": {
"_module": {
Copy link
Member

Choose a reason for hiding this comment

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

What are these _module objects? I think they shouldn't be here.

"kubernetes": {
"pod": {
"_module": {
"namespace": "kube-system"
Copy link
Member

Choose a reason for hiding this comment

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

Kubernetes namespace should be in kubernetes.namespace.

@@ -0,0 +1,464 @@
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
Copy link
Member

Choose a reason for hiding this comment

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

Is this the same file as the one in metricbeat/module/kubernetes/_meta/test/?

Could we also add metricbeat/module/kubernetes/_meta/test/kube-state-metrics to this testdata? If we can I think we could remove state_pod_test.go as you suggested.

"_module": {
"namespace": "kube-system",
"node": {
"name": "minikube"
Copy link
Member

Choose a reason for hiding this comment

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

Kubernetes node name should be in kubernetes.node.name.

m.enricher.Enrich(events)
for _, event := range events {
reporter.Event(mb.Event{
MetricSetFields: event,
Copy link
Member

Choose a reason for hiding this comment

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

You should use RootFields for common fields as kubernetes.namespace or kubernetes.pod.name.

@sayden sayden force-pushed the migration/mb/reporterv2/kubernetes/state_pod branch from 1e4a603 to 268a8af Compare April 2, 2019 12:07
Copy link
Collaborator

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

LGTM

@sayden sayden force-pushed the migration/mb/reporterv2/kubernetes/state_pod branch from 268a8af to 0ee4524 Compare April 4, 2019 09:16
@sayden sayden merged commit 928d12e into elastic:master Apr 4, 2019
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. Metricbeat Metricbeat Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants