Skip to content

Commit

Permalink
Add kubernetes.container.status.last.reason metric (#30306)
Browse files Browse the repository at this point in the history
* add kubernetes.container.status.last.reason metric

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

* rename status.last.reason -> status.last_terminated_reason

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

* fix changelog

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
(cherry picked from commit aaa36aa)

# Conflicts:
#	metricbeat/module/kubernetes/fields.go
  • Loading branch information
tetianakravchenko authored and mergify-bot committed Feb 11, 2022
1 parent f6dcd5a commit 17db9e9
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d

*Metricbeat*

- Add `add_resource_metadata` configuration to Kubernetes module. {pull}29133[29133]
- Add `containerd` module with `cpu`, `memory`, `blkio` metricsets. {pull}29247[29247]
- Add `container.id` and `container.runtime` ECS fields in container metricset. {pull}29560[29560]
- Add `memory.workingset.limit.pct` field in Kubernetes container/pod metricset. {pull}29547[29547]
- Add k8s metadata in state_cronjob metricset. {pull}29572[29572]
- Add `xpack.enabled` support for Enterprise Search module. {pull}29871[29871]
- Add gcp firestore metricset. {pull}29918[29918]
- Remove strict parsing on RabbitMQ module {pull}30090[30090]
- Add `kubernetes.container.status.last.reason` metric {pull}30306[30306]

*Packetbeat*

Expand Down
12 changes: 11 additions & 1 deletion metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43735,7 +43735,17 @@ type: integer
*`kubernetes.container.status.reason`*::
+
--
Waiting (ContainerCreating, CrashLoopBackoff, ErrImagePull, ImagePullBackoff) or termination (Completed, ContainerCannotRun, Error, OOMKilled) reason.
The reason the container is currently in waiting (ContainerCreating, CrashLoopBackoff, ErrImagePull, ImagePullBackoff) or terminated (Completed, ContainerCannotRun, Error, OOMKilled) state.


type: keyword

--

*`kubernetes.container.status.last_terminated_reason`*::
+
--
The last reason the container was in terminated state (Completed, ContainerCannotRun, Error or OOMKilled).


type: keyword
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/module/kubernetes/fields.go

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

8 changes: 6 additions & 2 deletions metricbeat/module/kubernetes/state_container/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@
- name: reason
type: keyword
description: >
Waiting (ContainerCreating, CrashLoopBackoff, ErrImagePull, ImagePullBackoff)
or termination (Completed, ContainerCannotRun, Error, OOMKilled) reason.
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 Down
Loading

0 comments on commit 17db9e9

Please sign in to comment.