# Kubernetes Module of Metricbeat does not get pct metrics from Kubelet on Windows

**URL:** https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-pct-metrics-from-kubelet-on-windows/315694
**Category:** Beats
**Tags:** metricbeat
**Created:** [October 3, 2022, 2:31pm UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-pct-metrics-from-kubelet-on-windows/315694 "2022-10-03T14:31:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rituzzzpilot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rituzzzpilot/32/111618_2.png) [@rituzzzpilot](https://discuss.elastic.co/u/rituzzzpilot)
#### Post date: [October 3, 2022, 2:31pm UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-pct-metrics-from-kubelet-on-windows/315694/1 "2022-10-03T14:31:35Z")

</div>

Hi, everyone

I have been testing metricbeat 7.17 Kubernetes module with Kubelet 1.24.3 and windows worker nodes (Windows Server 2022). I use **Metricbeat** in order to get metrics of **containers** , **pods** and **nodes**. I got node and pods metrics but kubernetes.pod.cpu.usage.node.pct and other pct is absent.  
I use standard configuration ans all available metricsets, also I've tried run metricmeat locally and as a pod - same issue

---

<div class="post-metadata">

### Author: ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)
#### Post date: [October 4, 2022, 6:59am UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-pct-metrics-from-kubelet-on-windows/315694/2 "2022-10-04T06:59:34Z")

</div>

Hi!

Do you have access to the Kubelet's API to see what metrics it serves?  
(I use sth like `curl -H "Authorization: Bearer $token" https://${HOSTNAME}:10250/stats/summary --insecure`)

Also make sure your configuration is aligned with what we suggest at [Run Metricbeat on Kubernetes | Metricbeat Reference [7.17] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/7.17/running-on-kubernetes.html)

---

<div class="post-metadata">

### Author: ![rituzzzpilot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rituzzzpilot/32/111618_2.png) [@rituzzzpilot](https://discuss.elastic.co/u/rituzzzpilot)
#### Post date: [October 5, 2022, 6:14am UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-pct-metrics-from-kubelet-on-windows/315694/3 "2022-10-05T06:14:13Z")

</div>

It seems to be ok

```auto
“containers”: [
    {
     “name”: “metricbeat-windows”,
     “startTime”: “2022-09-28T16:27:30Z”,
     “cpu”: {
      “time”: “2022-09-28T17:12:05Z”,
      “usageNanoCores”: 13926978,
      “usageCoreNanoSeconds”: 21734375000
     },
     “memory”: {
      “time”: “2022-09-28T17:12:05Z”,
      “workingSetBytes”: 60731392
     },
     “rootfs”: {
      “time”: “2022-09-28T17:11:57Z”,
      “availableBytes”: 15484485632,
      “capacityBytes”: 42275434496,
      “usedBytes”: 37748736,
      “inodesUsed”: 0
     },
     “logs”: {
      “time”: “2022-09-28T17:12:05Z”,
      “availableBytes”: 15484485632,
      “capacityBytes”: 42275434496,
      “usedBytes”: 1690,
      “inodesUsed”: 0

```

config if also fine:

```auto
metricbeat.modules:
- module: system
  period: 10s
  metricsets:
    - cpu
    - memory
    - network
    - process
    - process_summary
    - diskio
    - socket_summary

- module: system
  period: 1m
  metricsets:
    - filesystem
    - fsstat
  processors:
  - drop_event.when.regexp:
      system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)'

- module: kubernetes
  metricsets:
    - node
    - system
    - pod
    - container
    - volume
  period: 10s
  host: ${NODE_NAME}
  hosts: ["https://${NODE_NAME}:10250"]
  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
  add_metadata: true
  in_cluster: true
  labels.dedot: true
  annotations.dedot: true
  ssl.verification_mode: "none"

name: ${NODE_NAME}

processors:
- add_fields:
    target: ''
    fields:
      cluster_name: ${CLUSTER_NAME}

output.elasticsearch:
  hosts: ["elk_host:9200"]
  template.enabled: false
  index: "metricbeat_k8s-%{+yyyy.MM.dd}"
setup.template.enabled: false
logging.metrics.enabled: false
setup.ilm.enabled: false

```

And I have all needed metrics on linux nodes, the problem only on windows workers

---

<div class="post-metadata">

### Author: ![rituzzzpilot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rituzzzpilot/32/111618_2.png) [@rituzzzpilot](https://discuss.elastic.co/u/rituzzzpilot)
#### Post date: [October 19, 2022, 7:26am UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-pct-metrics-from-kubelet-on-windows/315694/4 "2022-10-19T07:26:07Z")

</div>

The issue solved by container rebuild

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 16, 2022, 9:26am UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-pct-metrics-from-kubelet-on-windows/315694/5 "2022-11-16T09:26:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
