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

cAdvisor metrics are missing pod network metrics #2895

Closed
sbouchex opened this issue Feb 5, 2021 · 2 comments
Closed

cAdvisor metrics are missing pod network metrics #2895

sbouchex opened this issue Feb 5, 2021 · 2 comments

Comments

@sbouchex
Copy link

sbouchex commented Feb 5, 2021

Environmental Info:
K3s Version:
k3s version v1.20.2+k3s1 (1d4adb0)
go version go1.15.5

Node(s) CPU architecture, OS, and Version:
Linux sbo-k3s-1.iv.local 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Cluster Configuration:
1 master + 2 workers

Describe the bug:
Scraping /metrics/cadvisor metrics with prometheus and could not find container_network_* metrics at the pod level. I only see container_network_receive_bytes_total at the node level.

# TYPE container_network_receive_bytes_total counter
container_network_receive_bytes_total{container="",id="/",image="",interface="cni0",name="",namespace="",pod=""} 1.209670734e+09 1612516652331
container_network_receive_bytes_total{container="",id="/",image="",interface="ens192",name="",namespace="",pod=""} 3.216718864e+09 1612516652331
container_network_receive_bytes_total{container="",id="/",image="",interface="flannel.1",name="",namespace="",pod=""} 1.744845961e+09 1612516652331

Steps To Reproduce:
K3s has been installed with the default install (i.e. no particular flags)
Then I started some pods and I'm using curl to scrape the cAdviser metrics (command looks like:
curl --insecure --header "Authorization: Bearer $TOKEN" https://10.148.20.68:10250/metrics/cadvisor | grep container_network_receive_bytes_total

Expected behavior:
I would expect to see "container_network_receive_bytes_total" metrics labeled with the pod name

Actual behavior:
they are missing

@brandond
Copy link
Member

brandond commented Feb 5, 2021

Duplicate of #2831

@air3ijai
Copy link

air3ijai commented Nov 3, 2023

cAdvisor output show the following

kubectl get --raw "/api/v1/nodes/<node-01>/proxy/metrics/cadvisor" |\
  grep container_network_transmit_packets_total

And container is empty - container=""

container_network_transmit_packets_total{container="",id="/kubepods/burstable/podfd94a85e-73cc-4492-a3fc-5c9a1aca304c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants