diff --git a/.chloggen/add-k8s-node-inode-metrics.yaml b/.chloggen/add-k8s-node-inode-metrics.yaml new file mode 100644 index 0000000000..b077d1a62c --- /dev/null +++ b/.chloggen/add-k8s-node-inode-metrics.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: k8s + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Add `k8s.node.filesystem.inode.count` and `k8s.node.filesystem.inode.free` metrics to track Kubernetes node root filesystem inode capacity and usage." + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [3858] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/docs/system/k8s-metrics.md b/docs/system/k8s-metrics.md index 282bef35fe..ed9979cd33 100644 --- a/docs/system/k8s-metrics.md +++ b/docs/system/k8s-metrics.md @@ -61,6 +61,8 @@ and therefore inherit its attributes, like `k8s.pod.name` and `k8s.pod.uid`. - [Metric: `k8s.node.filesystem.available`](#metric-k8snodefilesystemavailable) - [Metric: `k8s.node.filesystem.capacity`](#metric-k8snodefilesystemcapacity) - [Metric: `k8s.node.filesystem.usage`](#metric-k8snodefilesystemusage) + - [Metric: `k8s.node.filesystem.inode.count`](#metric-k8snodefilesysteminodecount) + - [Metric: `k8s.node.filesystem.inode.free`](#metric-k8snodefilesysteminodefree) - [Metric: `k8s.node.system_container.cpu.usage`](#metric-k8snodesystem_containercpuusage) - [Metric: `k8s.node.system_container.cpu.time`](#metric-k8snodesystem_containercputime) - [Metric: `k8s.node.system_container.memory.working_set`](#metric-k8snodesystem_containermemoryworking_set) @@ -1317,6 +1319,50 @@ of the Kubelet's stats API. +### Metric: `k8s.node.filesystem.inode.count` + +This metric is [recommended][MetricRecommended]. + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | +| -------- | --------------- | ----------- | -------------- | --------- | ------ | +| `k8s.node.filesystem.inode.count` | UpDownCounter | `{inode}` | The total inodes in the node's root filesystem. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`k8s.node`](/docs/registry/entities/k8s.md#k8s-node) | + +**[1]:** This metric is derived from the +[FsStats.Inodes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field +of the [NodeStats.Fs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#NodeStats) +of the Kubelet's stats API. + + + + + +### Metric: `k8s.node.filesystem.inode.free` + +This metric is [recommended][MetricRecommended]. + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations | +| -------- | --------------- | ----------- | -------------- | --------- | ------ | +| `k8s.node.filesystem.inode.free` | UpDownCounter | `{inode}` | The free inodes in the node's root filesystem. [1] | ![Development](https://img.shields.io/badge/-development-blue) | [`k8s.node`](/docs/registry/entities/k8s.md#k8s-node) | + +**[1]:** This metric is derived from the +[FsStats.InodesFree](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field +of the [NodeStats.Fs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#NodeStats) +of the Kubelet's stats API. + + + + + ### Metric: `k8s.node.system_container.cpu.usage` This metric is [recommended][MetricRecommended]. diff --git a/model/k8s/metrics.yaml b/model/k8s/metrics.yaml index af801a2537..bbc1e1a182 100644 --- a/model/k8s/metrics.yaml +++ b/model/k8s/metrics.yaml @@ -689,6 +689,41 @@ groups: of the [NodeStats.Fs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#NodeStats) of the Kubelet's stats API. + - id: metric.k8s.node.filesystem.inode.count + type: metric + metric_name: k8s.node.filesystem.inode.count + stability: development + brief: "The total inodes in the node's root filesystem." + instrument: updowncounter + annotations: + code_generation: + metric_value_type: int + unit: "{inode}" + entity_associations: + - k8s.node + note: | + This metric is derived from the + [FsStats.Inodes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [NodeStats.Fs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#NodeStats) + of the Kubelet's stats API. + - id: metric.k8s.node.filesystem.inode.free + type: metric + metric_name: k8s.node.filesystem.inode.free + stability: development + brief: "The free inodes in the node's root filesystem." + instrument: updowncounter + annotations: + code_generation: + metric_value_type: int + unit: "{inode}" + entity_associations: + - k8s.node + note: | + This metric is derived from the + [FsStats.InodesFree](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [NodeStats.Fs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#NodeStats) + of the Kubelet's stats API. + # k8s.node.memory.* metrics - id: metric.k8s.node.memory.usage type: metric