Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kubernetes] Add last_terminated_timestamp metric to state_container datastream #10503

Merged

Conversation

tetianakravchenko
Copy link
Contributor

@tetianakravchenko tetianakravchenko commented Jul 16, 2024

Proposed commit message

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Relates elastic/elastic-agent#3802

Related issues

Screenshots

Screenshot 2024-07-15 at 16 02 07

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@tetianakravchenko tetianakravchenko requested a review from a team as a code owner July 16, 2024 08:48
@@ -32,6 +32,9 @@
type: keyword
description: >
The last reason the container was in terminated state (Completed, ContainerCannotRun, Error or OOMKilled).
- name: last_terminated_timestamp
type: double
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small question: how this field is displayed if you change the type to date ?

Because I see other timestamp fields are marked as such

Copy link
Contributor Author

@tetianakravchenko tetianakravchenko Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gizas If changed to date:

{"log.level":"warn","@timestamp":"2024-07-16T09:17:20.612Z","message":"Cannot index event (status=400): dropping event! Look at the event log to view the event and cause." ...

some of fields indeed are of type date, but some - long or double, I've listed it here - elastic/beats#39200 (comment)

@elasticmachine
Copy link

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

@tetianakravchenko tetianakravchenko merged commit b9a416c into elastic:main Jul 16, 2024
5 checks passed
@elasticmachine
Copy link

Package kubernetes - 1.65.0 containing this change is available at https://epr.elastic.co/search?package=kubernetes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide last_terminated_reason_timestamp for when last_terminated_reason event happens in K8s Integration
5 participants