Hi,
I am currently evaluating different approaches to filter filter for deployments / statefulsets and show the child pods and containers including their metrics.
I noticed that in all metricsets having the prefix state_ the kubernetes labels are shown like this:
kubernetes.labels.appl: redis
kubernetes.labels.cluster: poc
kubernetes.labels.part-of: elasticStack
In container and pod events (without stat_ prefix, these labels are stored in a different manner:
kubernetes.container._module.labels.appl: redis
kubernetes.container._module.labels.cluster: poc
kubernetes.container._module.labels.part-of: elasticStack
For pods they are stored below kubernetes.pod._module.labels.*.
Could you please tell me:
- why did you choose different fields for storing the same logical data?
- Is there any method available in kibana to filter for joining / combining both fields to a container? Creating a manual filter with an ES-Query where I query both fields with or condition is not an option. That is unable to be used by normal users with dynamically changing filter queries.
- Is there any option in metricbeat NOT to add ._module to the labels? I would like to see all kubernetes labels in kubernetes.labels - regardless of the module which captured it / which kubernetes resource is affected.
- If currently no solution is available my only idea is writing a logstash ruby filter which will dynamically clone the the field
kubernetes.<module>._module.labels.*tokubernetes.labels.*
I am open for any solutions. So hopefully I have just missed some easy option, because I don't think that my usecase is so special.
thanks and regards, Andreas