-
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] Migrate Kubernetes state_pod Metricset to use ReporterV2 interface #10973
[Metricbeat] Migrate Kubernetes state_pod Metricset to use ReporterV2 interface #10973
Conversation
jenkins, test this |
Error in ES module seem unrelated https://beats-ci.elastic.co/job/elastic+beats+pull-request+multijob-linux/beat=metricbeat,label=linux-immutable/5455/console |
1e4bb79
to
0958d7b
Compare
After last push, error is related. Checking |
I'm not sure if |
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 have added some comments, I hope they help.
}, | ||
"kubernetes": { | ||
"pod": { | ||
"_module": { |
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.
What are these _module
objects? I think they shouldn't be here.
"kubernetes": { | ||
"pod": { | ||
"_module": { | ||
"namespace": "kube-system" |
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.
Kubernetes namespace should be in kubernetes.namespace
.
@@ -0,0 +1,464 @@ | |||
# HELP go_gc_duration_seconds A summary of the GC invocation durations. |
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 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" |
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.
Kubernetes node name should be in kubernetes.node.name
.
m.enricher.Enrich(events) | ||
for _, event := range events { | ||
reporter.Event(mb.Event{ | ||
MetricSetFields: event, |
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.
You should use RootFields
for common fields as kubernetes.namespace
or kubernetes.pod.name
.
1e4a603
to
268a8af
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.
LGTM
268a8af
to
0ee4524
Compare
Refer to #10774 for more info