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

metricsbeat collect source field for k8s event #17169

Closed
vsxen opened this issue Mar 23, 2020 · 4 comments · Fixed by #17209
Closed

metricsbeat collect source field for k8s event #17169

vsxen opened this issue Mar 23, 2020 · 4 comments · Fixed by #17209
Labels
Team:Platforms Label for the Integrations - Platforms team

Comments

@vsxen
Copy link

vsxen commented Mar 23, 2020

apiVersion: v1
count: 5832
eventTime: null
kind: Event
....
# there
source:
  component: kubelet
  host: demo
type: Warning

I want to know event in which node

https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/event/event.go#L167

@andresrc
Copy link
Contributor

Can you provide more information and/or context? Thanks

@andresrc andresrc added [zube]: Inbox Team:Platforms Label for the Integrations - Platforms team labels Mar 23, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@vsxen
Copy link
Author

vsxen commented Mar 24, 2020

@andresrc
Metricsbeat support collect k8s event from APIServer, but But some fields is missing.
Ex:
kubernetes.event.source.host

Ref
https://www.elastic.co/guide/en/beats/metricbeat/7.x/exported-fields-kubernetes.html#_event_4
https://www.elastic.co/guide/en/beats/metricbeat/7.x/metricbeat-metricset-kubernetes-event.html

output := common.MapStr{
"message": eve.Message,
"reason": eve.Reason,
"type": eve.Type,
"count": eve.Count,
"involved_object": common.MapStr{
"api_version": eve.InvolvedObject.APIVersion,
"resource_version": eve.InvolvedObject.ResourceVersion,
"name": eve.InvolvedObject.Name,
"kind": eve.InvolvedObject.Kind,
"uid": eve.InvolvedObject.UID,
},
"metadata": eventMeta,
}

@ChrsMark
Copy link
Member

ChrsMark commented Mar 24, 2020

I think this is a valid request. I opened a PR (#17209) for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants