Skip to content

Commit 4490cff

Browse files
committed
[k8s] Add k8s node allocatable metrics
Signed-off-by: odubajDT <[email protected]>
1 parent ab88f2a commit 4490cff

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
@@ -26,6 +26,10 @@ and therefore inherit its attributes, like `k8s.pod.name` and `k8s.pod.uid`.
2626
- [Metric: `k8s.pod.network.errors`](#metric-k8spodnetworkerrors)
2727
- [Node metrics](#node-metrics)
2828
- [Metric: `k8s.node.uptime`](#metric-k8snodeuptime)
29+
- [Metric: `k8s.node.allocatable_cpu`](#metric-k8snodeallocatable_cpu)
30+
- [Metric: `k8s.node.allocatable_memory`](#metric-k8snodeallocatable_memory)
31+
- [Metric: `k8s.node.allocatable_ephemeral_storage`](#metric-k8snodeallocatable_ephemeral_storage)
32+
- [Metric: `k8s.node.allocatable_pods`](#metric-k8snodeallocatable_pods)
2933
- [Metric: `k8s.node.cpu.time`](#metric-k8snodecputime)
3034
- [Metric: `k8s.node.cpu.usage`](#metric-k8snodecpuusage)
3135
- [Metric: `k8s.node.memory.usage`](#metric-k8snodememoryusage)
@@ -256,6 +260,86 @@ The actual accuracy would depend on the instrumentation and operating system.
256260
<!-- END AUTOGENERATED TEXT -->
257261
<!-- endsemconv -->
258262

263+
### Metric: `k8s.node.allocatable_cpu`
264+
265+
This metric is [recommended][MetricRecommended].
266+
267+
<!-- semconv metric.k8s.node.allocatable_cpu -->
268+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
269+
<!-- see templates/registry/markdown/snippet.md.j2 -->
270+
<!-- prettier-ignore-start -->
271+
<!-- markdownlint-capture -->
272+
<!-- markdownlint-disable -->
273+
274+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
275+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
276+
| `k8s.node.allocatable_cpu` | Gauge | `{cpu}` | Amount of cpu allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | |
277+
278+
<!-- markdownlint-restore -->
279+
<!-- prettier-ignore-end -->
280+
<!-- END AUTOGENERATED TEXT -->
281+
<!-- endsemconv -->
282+
283+
### Metric: `k8s.node.allocatable_memory`
284+
285+
This metric is [recommended][MetricRecommended].
286+
287+
<!-- semconv metric.k8s.node.allocatable_memory -->
288+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
289+
<!-- see templates/registry/markdown/snippet.md.j2 -->
290+
<!-- prettier-ignore-start -->
291+
<!-- markdownlint-capture -->
292+
<!-- markdownlint-disable -->
293+
294+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
295+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
296+
| `k8s.node.allocatable_memory` | Gauge | `By` | Amount of memory allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | |
297+
298+
<!-- markdownlint-restore -->
299+
<!-- prettier-ignore-end -->
300+
<!-- END AUTOGENERATED TEXT -->
301+
<!-- endsemconv -->
302+
303+
### Metric: `k8s.node.allocatable_ephemeral_storage`
304+
305+
This metric is [recommended][MetricRecommended].
306+
307+
<!-- semconv metric.k8s.node.allocatable_ephemeral_storage -->
308+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
309+
<!-- see templates/registry/markdown/snippet.md.j2 -->
310+
<!-- prettier-ignore-start -->
311+
<!-- markdownlint-capture -->
312+
<!-- markdownlint-disable -->
313+
314+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
315+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
316+
| `k8s.node.allocatable_ephemeral_storage` | Gauge | `By` | Amount of ephemeral-storage allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | |
317+
318+
<!-- markdownlint-restore -->
319+
<!-- prettier-ignore-end -->
320+
<!-- END AUTOGENERATED TEXT -->
321+
<!-- endsemconv -->
322+
323+
### Metric: `k8s.node.allocatable_pods`
324+
325+
This metric is [recommended][MetricRecommended].
326+
327+
<!-- semconv metric.k8s.node.allocatable_pods -->
328+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
329+
<!-- see templates/registry/markdown/snippet.md.j2 -->
330+
<!-- prettier-ignore-start -->
331+
<!-- markdownlint-capture -->
332+
<!-- markdownlint-disable -->
333+
334+
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
335+
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
336+
| `k8s.node.allocatable_pods` | Gauge | `` | Amount of pods allocatable on the node | ![Development](https://img.shields.io/badge/-development-blue) | |
337+
338+
<!-- markdownlint-restore -->
339+
<!-- prettier-ignore-end -->
340+
<!-- END AUTOGENERATED TEXT -->
341+
<!-- endsemconv -->
342+
259343
### Metric: `k8s.node.cpu.time`
260344

261345
This metric is [recommended][MetricRecommended].

model/k8s/metrics.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,34 @@ groups:
7474
The actual accuracy would depend on the instrumentation and operating system.
7575
instrument: gauge
7676
unit: "s"
77+
- id: metric.k8s.node.allocatable_cpu
78+
type: metric
79+
metric_name: k8s.node.allocatable_cpu
80+
stability: development
81+
brief: "Amount of cpu allocatable on the node"
82+
instrument: gauge
83+
unit: "{cpu}"
84+
- id: metric.k8s.node.allocatable_ephemeral_storage
85+
type: metric
86+
metric_name: k8s.node.allocatable_ephemeral_storage
87+
stability: development
88+
brief: "Amount of ephemeral-storage allocatable on the node"
89+
instrument: gauge
90+
unit: "By"
91+
- id: metric.k8s.node.allocatable_memory
92+
type: metric
93+
metric_name: k8s.node.allocatable_memory
94+
stability: development
95+
brief: "Amount of memory allocatable on the node"
96+
instrument: gauge
97+
unit: "By"
98+
- id: metric.k8s.node.allocatable_pods
99+
type: metric
100+
metric_name: k8s.node.allocatable_pods
101+
stability: development
102+
brief: "Amount of pods allocatable on the node"
103+
instrument: gauge
104+
unit: ""
77105
# k8s.node.cpu.* metrics
78106
- id: metric.k8s.node.cpu.time
79107
type: metric

0 commit comments

Comments
 (0)