Open kustodian opened 1 year ago
This may be due to the fact that containers in a pod all share the same network namespace. All the containers are communicating over the same interfaces, so there's probably not a simple way to distinguish traffic metrics between containers.
The pause
image is from a hidden container that runs in all pods, who's purpose is to preserve the network namespace config even when the other container(s) restart or die. See: https://stackoverflow.com/questions/48651269/what-are-the-pause-containers
We are running GKE with Kubernetes 1.22 and we have some strange labels for the Prometheus
container_*
metrics. Let me give you a few examples.I printed all the container_* metrics for a single pod with a PromQL like this:
I'm not going to paste the whole output, but here are a few strange metrics.
Some metrics don't have
container
andimage
labelsFor example
container_memory_*
looks like this:As you can see the first metric has the
container
andimage
labels, the second one doesn't havecontainer
, while the third one doesn't have bothcontainer
andimage
labels. If the metric name iscontainer_*
I would expect that all these container metrics have thecontainer
label. Also, I don't understand what are these values. I would expect that if I sum19812352 + 184320
would be the same as the last metric without anycontainer
/image
labels, but they don't match:There are other metrics like this, e.g.
container_cpu_*
,container_file_*
,container_last_seen
, and others...Also, it's very strange that we can see
pause
containers, even though it doesn't display it as a container.Some metrics don't have
container
labels at allFor example
container_network_*
looks like this:It's strange that these network metrics don't have the
container
label. Also, what do the values mean? It's also very strange seeing thepause
container generating traffic and like above it's strange seeing thepause
container at all.My expectations are that all
container_*
metrics have bothcontainer
andimage
labels, or they don't make much sense.