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 to support kube-state-metrics version 2.0.0 #21520

Closed
jmartin51 opened this issue Oct 5, 2020 · 8 comments · Fixed by #27552
Closed

Metricbeat to support kube-state-metrics version 2.0.0 #21520

jmartin51 opened this issue Oct 5, 2020 · 8 comments · Fixed by #27552
Labels
containers Related to containers use case Team:Integrations Label for the Integrations team Team:Platforms Label for the Integrations - Platforms team

Comments

@jmartin51
Copy link

Describe the enhancement:
Metricbeat to support kube-state-metrics version 2.0.0 for kubernetes 1.17/1.18

Describe a specific use case for the enhancement or feature:

Some clarifications are needed here. Thanks.

@jmartin51 jmartin51 added the Team:Platforms Label for the Integrations - Platforms team label Oct 5, 2020
@elasticmachine
Copy link
Collaborator

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

@rukas
Copy link

rukas commented Jan 21, 2021

Is there any update on this?

@eedugon eedugon added the Team:Integrations Label for the Integrations team label Mar 8, 2021
@exekias
Copy link
Contributor

exekias commented Mar 8, 2021

@ChrsMark this one looks important, we need to check for any breaking change sin ksm 2.0

@exekias exekias added the containers Related to containers use case label Mar 8, 2021
@eedugon
Copy link
Contributor

eedugon commented Mar 9, 2021

FYI I was doing some tests yesterday with Kubernetes 1.19.7 (GKE) + Kube-state-metrics 2.0.0-rc0 (released a few days ago) and Metricbeat 7.10.2 and all the integration working perfectly fine for the following metricsets:

                - module: kubernetes
                  hosts: ["kube-state-metrics:8080"]
                  period: 30s
                  add_metadata: true
                  metricsets:
                    - state_node
                    - state_deployment
                    - state_daemonset
                    - state_replicaset
                    - state_pod
                    - state_container
                    - state_cronjob
                    - state_resourcequota
                    - state_statefulset
                - module: kubernetes
                  metricsets:
                    - event

(I'm not sure if the event module is related with this, but anyway :) )

Apparently no errors in the output:

"state_container":{"events":43,"success":43},"state_daemonset":{"events":8,"success":8},"state_deployment":{"events":8,"success":8},"state_node":{"events":3,"success":3},"state_pod":{"events":28,"success":28},"state_replicaset":{"events":10,"success":10},"state_resourcequota":{"events":91,"success":91},"state_statefulset":{"events":2,"success":2}

@ChrsMark
Copy link
Member

ChrsMark commented Mar 9, 2021

Thanks @eedugon ! For clarity, all state_* metricsets collect metrics from kube-state-metrics.

Most probably nothing will break with the new versions. What may happen is that we will don't leverage new metrics that will be exposed or some metrics that we expect will not be there. Indeed we need to find the time to check this one.

@MnrGreg
Copy link

MnrGreg commented Apr 16, 2021

Breaking changes in kube-state-metrics v2.0.0 affects state_container and state_node.
Deprecated Metrics were dropped kubernetes/kube-state-metrics#974.

Example of replaced metrics:
state_container:

kube_pod_container_resource_limits_memory_bytes
-->
kube_pod_container_resource_limits{namespace="kube-system",pod="metricbeat-jwgjb",container="metricbeat",node="node1",resource="memory",unit="byte"} 8.05306368e+08

"kube_pod_container_resource_limits_cpu_cores": p.Metric("cpu.limit.cores"),
"kube_pod_container_resource_requests_cpu_cores": p.Metric("cpu.request.cores"),
"kube_pod_container_resource_limits_memory_bytes": p.Metric("memory.limit.bytes"),
"kube_pod_container_resource_requests_memory_bytes": p.Metric("memory.request.bytes"),


state_node:

kube_node_status_capacity_cpu_cores
-->
kube_node_status_capacity{node="node1",resource="cpu",unit="core"} 2

"kube_node_status_allocatable_pods": p.Metric("pod.allocatable.total"),
"kube_node_status_capacity_pods": p.Metric("pod.capacity.total"),
"kube_node_status_capacity_memory_bytes": p.Metric("memory.capacity.bytes"),
"kube_node_status_allocatable_memory_bytes": p.Metric("memory.allocatable.bytes"),
"kube_node_status_capacity_cpu_cores": p.Metric("cpu.capacity.cores"),
"kube_node_status_allocatable_cpu_cores": p.Metric("cpu.allocatable.cores"),

@svonliebenstein
Copy link

Great work on the MR @MichaelKatsoulis!

Since Kubernetes 1.19, kube-state-metrics v2.x.x is required to be compatible (https://github.com/kubernetes/kube-state-metrics/#compatibility-matrix). Unfortunately this is currently not fully working with the latest 7.14.1 metricbeat.
Can we expect a 7.14.2 or 7.15 release anytime soon with this feature?

When this is available, it would mean that it's possible to setup a kubernetes cluster with ksm and metricbeat on Kubernetes 1.19 - 1.22.

@MichaelKatsoulis
Copy link
Contributor

Great work on the MR @MichaelKatsoulis!

Thank you @svonliebenstein!

Can we expect a 7.14.2 or 7.15 release anytime soon with this feature?

The support of kube-state-metrics v2.0 will be part of patch release 7.15.1 and new release 7.16.

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

Successfully merging a pull request may close this issue.

9 participants