Heapster not getting network rx and tx bytes info #368
Comments
|
This is a known issue. Kubelet does not expose network stats. We will fix this as soon as Kubernetes v1.0 is rolled out. Network stats should be available for the node though. cc @dchen1107 |
|
Thanks for the reply ! Assuming node means 'worker nodes where kubelet and proxy runs', I am not getting any node specific network stats. Though I am getting cpu and memory based stats. |
|
Thats not expected. I will investigate! Thanks for reporting the issue. On Thu, Jun 25, 2015 at 4:17 AM, Akash Agarwal notifications@github.com
|
|
Any update on this? Haven't seen it working yet - not sure if I missed it. |
|
Waiting for kubelet to expose pod level metrics. @timstclair is working on the kubelet APIs now. |
|
@vishh @timstclair What's the status of this? Any kubernetes issues/PRs I can look at? |
|
@jimmidyson we just decided that we need to re-think the API, rather than trying to force the cAdvisor API into k8s. I should have a PR out in the next couple of days, but I suspect it will not get merged until after thanksgiving since a lot of people are out next week. You can see the draft here (actively changing): https://github.com/timstclair/kubernetes/blob/metrics-beta/pkg/apis/metrics/types.go |
|
@timstclair Thanks for the update. Look forward to your PR! |
|
@timstclair @vishh When do you aim for a stable stats v2 endpoint in kubernetes? A couple of months perhaps? Thinking about users who want to use network stats today & can see a simple fix to heapster to ingest them - network stats from kubelet are correctly exposed today, ready for ingestion, albeit in a raw cadvisor form. What do you think about just adding in network stats to existing heapster API while we wait for @timstclair's PR & any subsequent stabilisation of the new metrics APIs? /cc @jcantrill |
I'd like to deprecate the
Which network stats are you looking for? It looks like heapster already has |
|
@jimmidyson: A workaround for now SGTM. Let's get this working. The On Mon, Nov 23, 2015 at 12:23 PM, Tim St. Clair notifications@github.com
|
|
So this is a bit more involved than I thought it would be. AFAIK there is no way to query the infra container in a pod with the current kubelet API & as the network metrics are associated only to the infra container that means there is no way to get the network metrics. I guess this will have to wait for the new metrics APIs. @vishh Does that sound right to you or can you think of a simple way to work around this without waiting for new metrics APIs? |
|
SO we pull all the containers from cadvisor already. We filter out the Infact, we can get avoid accessing kubelet APIs completely, if we had a map Look here: On Fri, Dec 4, 2015 at 8:42 AM, Jimmi Dyson notifications@github.com
|
|
@vishh @jimmidyson right now stats are per-container, any idea on how to represent these per-pod network metrics? I think you mentioned the problem here above but I didn't understand the conclusion. You mentioned the |
|
I am erring on waiting until the new metrics APIs are finalised as this will be pod based rather than container based. However if this is a requirement in the near future then we should probably get this added to existing APIs. This will be a bit trickier (& dirtier) to do but should be doable. |
|
@jimmidyson with regard to openshift (openshift-metrics) when is expected the new API to be finalized? Is it for 3.2? We expected to have network metrics in 3.1.z. cc @smarterclayton to keep me honest on the expectancy. |
|
We would certainly like to have network metrics, since it can be a On Tue, Dec 29, 2015 at 4:37 PM, Federico Simoncelli <
|
|
The problem is that the infrastructure container isn't included in the pod status retrievable from the kube API (the API server is unaware of the infrastructure container from what I can see). The way that Heapster currently works is to get container info for each pod from API server then request stats for each container from the appropriate kubelet (of course this is really inefficient & addressed in the ongoing rewrite of heapster AFAIK). Currently the infra container is totally ignored by heapster (https://github.com/kubernetes/heapster/blob/master/sources/datasource/kubelet.go#L180) as it's labelled as a member of a kubernetes pod, but not known to the API server. I cannot see anything else available that identifies it as the infra container for a pod, other than the format of the container name & the network mode (normal pod containers have a network mode of The current kubelet APIs only allow querying for a) a container of a pod (which the infra container isn't listed as so is not queryable this way); b) a raw container via a Docker ID (no way to know); c) by getting all raw containers, extracting pod name from the container name (follows known regexp ATM) & adding this to pod info somehow. So c is the only option I can see, but it seems pretty fragile (no way to identify it's actually an infra container that I can think of). How does that sound? Any other ideas? Dirty & fragile but without a major rework (the Heapster rewrite & new metrics APIs) this is the only option I can see. I would prefer to wait for the updated versions as I said before but if it's wanted I can probably hack it together. |
|
So looking again it seems the infra container name is hard coded to |
|
The kubelet-metrics API was finally merged On Mon, Jan 4, 2016 at 10:14 AM, Jimmi Dyson notifications@github.com
|
Hi
I am running heapster on kubernetes. Several pods are running but all of them giving 0 values in rx and tx network stats.
On doing docker stats , I found that network stats are also coming 0 for that container but network stats are coming in cadvisor correctly.
Network stats for the pod gcr.io/google_containers/pause:0.8.0 are coming correctly but they are not communicated into the influxdb by the heapster. The containers corresponding to this gcr.io/google_containers/pause:0.8.0 are showing 0 network stats.
What should I do to get correct network stats ?
Please help !
The text was updated successfully, but these errors were encountered: