Skip to content

Commit

Permalink
[kubernetes] Remove deprecated fields, add missing status.last_termin…
Browse files Browse the repository at this point in the history
…ated_reason metric (#9736)

* remove deprecated fields

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* Update changelog.yml

* add missing metric: last_terminated_reason; update description of the status.reason field

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

---------

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
  • Loading branch information
tetianakravchenko committed Apr 30, 2024
1 parent b1627a3 commit a79f813
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
5 changes: 5 additions & 0 deletions packages/kubernetes/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: 1.61.0
changes:
- description: Remove deprecated fields and add missing status.last_terminated_reason metric
type: enhancement
link: https://github.com/elastic/integrations/pull/9736
- version: 1.60.0
changes:
- description: Updating `Memory used vs total memory` and `Cores used vs total cores` visualisations in Cluster Overview Dashboard
Expand Down
19 changes: 7 additions & 12 deletions packages/kubernetes/data_stream/state_container/fields/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@
- name: reason
dimension: true
type: keyword
description: |
Waiting (ContainerCreating, CrashLoopBackoff, ErrImagePull, ImagePullBackoff) or termination (Completed, ContainerCannotRun, Error, OOMKilled) reason.
description: >
The reason the container is currently in waiting (ContainerCreating, CrashLoopBackoff, ErrImagePull,
ImagePullBackoff) or terminated (Completed, ContainerCannotRun, Error, OOMKilled) state.
- name: last_terminated_reason
type: keyword
description: >
The last reason the container was in terminated state (Completed, ContainerCannotRun, Error or OOMKilled).
- name: cpu
type: group
fields:
Expand All @@ -40,16 +45,6 @@
metric_type: gauge
description: |
Container CPU requested cores
- name: limit.nanocores
type: long
metric_type: gauge
description: |
Container CPU nanocores limit
- name: request.nanocores
type: long
metric_type: gauge
description: |
Container CPU requested nanocores
- name: memory
type: group
fields:
Expand Down
5 changes: 2 additions & 3 deletions packages/kubernetes/docs/kube-state-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,15 @@ An example event for `state_container` looks as following:
| host.type | Type of host. For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment. | keyword | | |
| kubernetes.annotations.\* | Kubernetes annotations map | object | | |
| kubernetes.container.cpu.limit.cores | Container CPU cores limit | float | | gauge |
| kubernetes.container.cpu.limit.nanocores | Container CPU nanocores limit | long | | gauge |
| kubernetes.container.cpu.request.cores | Container CPU requested cores | float | | gauge |
| kubernetes.container.cpu.request.nanocores | Container CPU requested nanocores | long | | gauge |
| kubernetes.container.id | Container id | keyword | | |
| kubernetes.container.memory.limit.bytes | Container memory limit in bytes | long | byte | gauge |
| kubernetes.container.memory.request.bytes | Container requested memory in bytes | long | byte | gauge |
| kubernetes.container.name | Kubernetes container name | keyword | | |
| kubernetes.container.status.last_terminated_reason | The last reason the container was in terminated state (Completed, ContainerCannotRun, Error or OOMKilled). | keyword | | |
| kubernetes.container.status.phase | Container phase (running, waiting, terminated) | keyword | | |
| kubernetes.container.status.ready | Container ready status | boolean | | |
| kubernetes.container.status.reason | Waiting (ContainerCreating, CrashLoopBackoff, ErrImagePull, ImagePullBackoff) or termination (Completed, ContainerCannotRun, Error, OOMKilled) reason. | keyword | | |
| kubernetes.container.status.reason | The reason the container is currently in waiting (ContainerCreating, CrashLoopBackoff, ErrImagePull, ImagePullBackoff) or terminated (Completed, ContainerCannotRun, Error, OOMKilled) state. | keyword | | |
| kubernetes.container.status.restarts | Container restarts count | integer | | counter |
| kubernetes.cronjob.name | Name of the CronJob to which the Pod belongs | keyword | | |
| kubernetes.daemonset.name | Kubernetes daemonset name | keyword | | |
Expand Down
2 changes: 1 addition & 1 deletion packages/kubernetes/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: 3.1.2
name: kubernetes
title: Kubernetes
version: 1.60.0
version: 1.61.0
description: Collect logs and metrics from Kubernetes clusters with Elastic Agent.
type: integration
categories:
Expand Down

0 comments on commit a79f813

Please sign in to comment.