-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Introducing Deployment condition status metric in Kubernetes module #35999
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
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.
You will need to add the new field in the respective fields.yml
file so as to define its mapping.
metricbeat/module/kubernetes/state_deployment/_meta/test/ksm.v2.4.2.plain.expected
Show resolved
Hide resolved
CHANGELOG.next.asciidoc
Outdated
@@ -23,6 +23,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] | |||
|
|||
|
|||
*Metricbeat* | |||
- Introducing Deployment condition status metric in Kubernetes module {pull}35999[35999] |
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.
This is not a breaking change. Hence it should go in ==== Added
section.
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.
Fixed
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.
I think that the original metric should as well
https://github.com/elastic/beats/blob/ac1d127d6868caff2f1bbbc670bbfff7f88930fc/metricbeat/module/kubernetes/_meta/test/ksm.v2.4.2.plain
@@ -59,6 +59,10 @@ | |||
"MetricSetFields": { | |||
"name": "coredns", | |||
"paused": false, | |||
"status": { | |||
"available": "true", |
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.
formatting seems to be not correct
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.
updated
/* | ||
This is how deployment_status_condition field will be exported: | ||
|
||
kube_deployment_status_condition{namespace="default",deployment="test-deployment",condition="Available",status="true"} 0 |
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.
I think it should be enough to add it in corresponding plain
file - https://github.com/elastic/beats/blob/ac1d127d6868caff2f1bbbc670bbfff7f88930fc/metricbeat/module/kubernetes/_meta/test/ksm.v2.4.2.plain, instead of this comment
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.
It is already there see line 222
It is more alligned to this comment:
beats/metricbeat/module/kubernetes/state_job/state_job.go
Lines 41 to 46 in ac1d127
// These fields will be set to "true", "false", or "unknown" based on input that looks | |
// like this: | |
// | |
// kube_job_complete{namespace="default",job_name="timer-27074308",condition="true"} 1 | |
// kube_job_complete{namespace="default",job_name="timer-27074308",condition="false"} 0 | |
// kube_job_complete{namespace="default",job_name="timer-27074308",condition="unknown"} 0 |
I found it helpful when first looked the code, because you can not understand how the p.LabelMatric works from first glance.
Let me know if you think is obsolete and I can remove it
Done thanks ! |
"status": { | ||
"available": "true", | ||
"progressing": "true" | ||
}, |
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.
This bracket should be one layer in, right? Like https://github.com/elastic/beats/pull/35999/files#diff-050ad6dbacd48af0a47953cade64df8f81c2104c232ddc15dfc1feff29d48badR40-R43.
Same for the rest of them.
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.
Blew my brain :) Fixed thanks @ChrsMark
Co-authored-by: Chris Mark <[email protected]>
…lastic#35999) * adding deployment condition status * Update CHANGELOG.next.asciidoc * fixing unittests --------- Co-authored-by: Chris Mark <[email protected]>
What does this PR do?
Introduces the kube_deployment_status_condition metric inside kubernetes.state_deployment metrciset. In more details a new field will be indexed called
kubernetes.deployment.status
Why is it important?
Relates to elastic/elastic-agent#2995
Introduces
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
See information on elastic/elastic-agent#2995
Related issues