Skip to content

Commit

Permalink
[receiver/k8scluster] Unify predefined and custom node metrics
Browse files Browse the repository at this point in the history
Update metrics description and units to be consistent and remove predefined metrics definitions from metadata.yaml because they are controlled by `node_conditions_to_report` and `allocatable_types_to_report` config options. Having two controls to enable/disable metrics would be confusing.

Potentially, later we could introduce support of metadata.yaml definitions for metrics matching particular globs like `k8s.node.condition_*`
  • Loading branch information
dmitryax committed Aug 2, 2023
1 parent 9e17996 commit a372560
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 1,036 deletions.
23 changes: 23 additions & 0 deletions .chloggen/k8scluster-remove-node-metrics-from-metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# 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: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: receiver/k8scluster

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Unify predefined and custom node metrics.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [24776]

# (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: |
- Update metrics description and units to be consistent
- Remove predefined metrics definitions from metadata.yaml because they are controlled by `node_conditions_to_report`
and `allocatable_types_to_report` config options.
80 changes: 0 additions & 80 deletions receiver/k8sclusterreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,86 +228,6 @@ The current phase of namespaces (1 for active and 0 for terminating)
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
### k8s.node.allocatable_cpu
How many CPU cores remaining that the node can allocate to pods
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {cores} | Gauge | Double |
### k8s.node.allocatable_ephemeral_storage
How many bytes of ephemeral storage remaining that the node can allocate to pods
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| By | Gauge | Int |
### k8s.node.allocatable_memory
How many bytes of RAM memory remaining that the node can allocate to pods
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| By | Gauge | Int |
### k8s.node.allocatable_pods
How many pods remaining the node can allocate
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {pods} | Gauge | Int |
### k8s.node.allocatable_storage
How many bytes of storage remaining that the node can allocate to pods
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| By | Gauge | Int |
### k8s.node.condition_disk_pressure
Whether this node is DiskPressure (1), not DiskPressure (0) or in an unknown state (-1)
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
### k8s.node.condition_memory_pressure
Whether this node is MemoryPressure (1), not MemoryPressure (0) or in an unknown state (-1)
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
### k8s.node.condition_network_unavailable
Whether this node is NetworkUnavailable (1), not NetworkUnavailable (0) or in an unknown state (-1)
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
### k8s.node.condition_pid_pressure
Whether this node is PidPressure (1), not PidPressure (0) or in an unknown state (-1)
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
### k8s.node.condition_ready
Whether this node is Ready (1), not Ready (0) or in an unknown state (-1)
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| 1 | Gauge | Int |
### k8s.pod.phase
Current phase of the pod (1 - Pending, 2 - Running, 3 - Succeeded, 4 - Failed, 5 - Unknown)
Expand Down
40 changes: 0 additions & 40 deletions receiver/k8sclusterreceiver/internal/metadata/generated_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a372560

Please sign in to comment.