aws / aws/amazon-cloudwatch-agent

[k8s][containerd] container file system metrics is not supported by cadvisor for contianerd

Open
#192 0 comments 0 reactions 0 assignees View on GitHub
area/container bug component/container-insight enhancement
Dominant language
Go
Stars
550
Forks
271
Avg merge
1d 21h
Merged PRs (30d)
13

Description

Follow up on #188

## Background

- Upstream issue https://github.com/google/cadvisor/issues/2785
- PR https://github.com/google/cadvisor/pull/2872 and https://github.com/google/cadvisor/pull/2936

When using containerd runtime, you will not see container filesystem metrics in structured log.
Node filesystem metrics is still there, and there is no pod filesystem metrics regardless of runtime.

```text
"device",
"fstype",
"container_filesystem_available",
"container_filesystem_capacity",
"container_filesystem_usage",
"container_filesystem_utilization"
```

## Fix

That metrics is supported in both docker and crio and the rough logic is get rootfs dir for the container, base on the storage driver do some calculation, a common helper is also used to simply walk the dir and call Stat on every file (which is also how size limit is enforced by kubelet for emptydir volume).

~~We might be able to contribute to upstream~~

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.