Skip to content

Commit 883c290

Browse files
committed
[k8s] Add k8s node allocatable metrics
Signed-off-by: odubajDT <[email protected]>
1 parent 14eacc8 commit 883c290

File tree

3 files changed

+134
-0
lines changed

3 files changed

+134
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: k8s
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Add `k8s.node.allocatable_cpu`, `k8s.node.allocatable_ephemeral_storage`, `k8s.node.allocatable_memory`, `k8s.node.allocatable_pods` metrics
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [2243]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/system/k8s-metrics.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ and therefore inherit its attributes, like `k8s.pod.name` and `k8s.pod.uid`.
2929
- [Metric: `k8s.container.status.reason`](#metric-k8scontainerstatusreason)
3030
- [Node metrics](#node-metrics)
3131
- [Metric: `k8s.node.uptime`](#metric-k8snodeuptime)
32+
- [Metric: `k8s.node.allocatable_cpu`](#metric-k8snodeallocatable_cpu)
33+
- [Metric: `k8s.node.allocatable_memory`](#metric-k8snodeallocatable_memory)
34+
- [Metric: `k8s.node.allocatable_ephemeral_storage`](#metric-k8snodeallocatable_ephemeral_storage)
35+
- [Metric: `k8s.node.allocatable_pods`](#metric-k8snodeallocatable_pods)
3236
- [Metric: `k8s.node.cpu.time`](#metric-k8snodecputime)
3337
- [Metric: `k8s.node.cpu.usage`](#metric-k8snodecpuusage)
3438
- [Metric: `k8s.node.memory.usage`](#metric-k8snodememoryusage)
@@ -354,6 +358,86 @@ The actual accuracy would depend on the instrumentation and operating system.
354358
<!-- END AUTOGENERATED TEXT -->
355359
<!-- endsemconv -->
356360

361+
### Metric: `k8s.node.allocatable_cpu`
362+
363+
This metric is [recommended][MetricRecommended].
364+
365+
<!-- semconv metric.k8s.node.allocatable_cpu -->
366+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
367+
<!-- see templates/registry/markdown/snippet.md.j2 -->
368+
<!-- prettier-ignore-start -->
369+
<!-- markdownlint-capture -->
370+
<!-- markdownlint-disable -->
371+
372+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
373+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
374+
| `k8s.node.allocatable_cpu` | Gauge | `{cpu}` | Amount of cpu allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | |
375+
376+
<!-- markdownlint-restore -->
377+
<!-- prettier-ignore-end -->
378+
<!-- END AUTOGENERATED TEXT -->
379+
<!-- endsemconv -->
380+
381+
### Metric: `k8s.node.allocatable_memory`
382+
383+
This metric is [recommended][MetricRecommended].
384+
385+
<!-- semconv metric.k8s.node.allocatable_memory -->
386+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
387+
<!-- see templates/registry/markdown/snippet.md.j2 -->
388+
<!-- prettier-ignore-start -->
389+
<!-- markdownlint-capture -->
390+
<!-- markdownlint-disable -->
391+
392+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
393+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
394+
| `k8s.node.allocatable_memory` | Gauge | `By` | Amount of memory allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | |
395+
396+
<!-- markdownlint-restore -->
397+
<!-- prettier-ignore-end -->
398+
<!-- END AUTOGENERATED TEXT -->
399+
<!-- endsemconv -->
400+
401+
### Metric: `k8s.node.allocatable_ephemeral_storage`
402+
403+
This metric is [recommended][MetricRecommended].
404+
405+
<!-- semconv metric.k8s.node.allocatable_ephemeral_storage -->
406+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
407+
<!-- see templates/registry/markdown/snippet.md.j2 -->
408+
<!-- prettier-ignore-start -->
409+
<!-- markdownlint-capture -->
410+
<!-- markdownlint-disable -->
411+
412+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
413+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
414+
| `k8s.node.allocatable_ephemeral_storage` | Gauge | `By` | Amount of ephemeral-storage allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | |
415+
416+
<!-- markdownlint-restore -->
417+
<!-- prettier-ignore-end -->
418+
<!-- END AUTOGENERATED TEXT -->
419+
<!-- endsemconv -->
420+
421+
### Metric: `k8s.node.allocatable_pods`
422+
423+
This metric is [recommended][MetricRecommended].
424+
425+
<!-- semconv metric.k8s.node.allocatable_pods -->
426+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
427+
<!-- see templates/registry/markdown/snippet.md.j2 -->
428+
<!-- prettier-ignore-start -->
429+
<!-- markdownlint-capture -->
430+
<!-- markdownlint-disable -->
431+
432+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
433+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
434+
| `k8s.node.allocatable_pods` | Gauge | `` | Amount of pods allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | |
435+
436+
<!-- markdownlint-restore -->
437+
<!-- prettier-ignore-end -->
438+
<!-- END AUTOGENERATED TEXT -->
439+
<!-- endsemconv -->
440+
357441
### Metric: `k8s.node.cpu.time`
358442

359443
This metric is [recommended][MetricRecommended].

model/k8s/metrics.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,34 @@ groups:
102102
The actual accuracy would depend on the instrumentation and operating system.
103103
instrument: gauge
104104
unit: "s"
105+
- id: metric.k8s.node.allocatable_cpu
106+
type: metric
107+
metric_name: k8s.node.allocatable_cpu
108+
stability: development
109+
brief: "Amount of cpu allocatable on the node"
110+
instrument: gauge
111+
unit: "{cpu}"
112+
- id: metric.k8s.node.allocatable_ephemeral_storage
113+
type: metric
114+
metric_name: k8s.node.allocatable_ephemeral_storage
115+
stability: development
116+
brief: "Amount of ephemeral-storage allocatable on the node"
117+
instrument: gauge
118+
unit: "By"
119+
- id: metric.k8s.node.allocatable_memory
120+
type: metric
121+
metric_name: k8s.node.allocatable_memory
122+
stability: development
123+
brief: "Amount of memory allocatable on the node"
124+
instrument: gauge
125+
unit: "By"
126+
- id: metric.k8s.node.allocatable_pods
127+
type: metric
128+
metric_name: k8s.node.allocatable_pods
129+
stability: development
130+
brief: "Amount of pods allocatable on the node"
131+
instrument: gauge
132+
unit: ""
105133
# k8s.node.cpu.* metrics
106134
- id: metric.k8s.node.cpu.time
107135
type: metric

0 commit comments

Comments
 (0)