Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_reason_timestamp metric #39200
[kubernetes] Add last_terminated_reason_timestamp metric #39200
Changes from 1 commit
743246a
a1672a6
180afdf
90d82b6
4617806
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you map
kube_pod_container_status_last_terminated_timestamp
ksm metric to elasticsearch fieldkubernetes.container.status.last_terminated_reason.sec
. But then , the field you declare in the fields.yaml islast_terminated_reason_timestamp
. Am I missing something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my mistake, reverted this - 180afdf
It is a leftover, I was considering other naming, not really sure regarding the name
last_terminated_reason_timestamp
. For example in state_cronjob - https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/state_cronjob/state_cronjob.go#L33-L34 is used*.sec
for time metrics, but then I figured out that there is not really a pattern for time metrics, for example:job -
time.*
(type of the field: data)statefulset - no
time
orsec
in name (type: long)storageclass - no
time
orsec
in name (type: date)namespace -
created.sec
, type: doubledo you have any thoughts on naming?
maybe use
last_terminated
(similar to*.created
with the type: double) ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have the field
status.last_terminated_reason
that corresponds tokube_pod_container_status_last_terminated_reason
.If we follow the same convention for
kube_pod_container_status_last_terminated_timestamp
let's name the fieldstatus.last_terminated_timestamp
. There is no need to add thereason
in the field name as it is just the timestamp of the last termination. It is not related with the reason.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 90d82b6