-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix empty node stats pipelines #17185
Conversation
This pull request does not have a backport label. Could you fix it @kaisecheng? 🙏
|
|
2f3c03c
to
c0b4cdb
Compare
|
:workers => stats[:config][:workers], | ||
:batch_size => stats[:config][:batch_size], | ||
:batch_delay => stats[:config][:batch_delay], | ||
:workers => stats.dig(:config, :workers), |
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.
So the bug before was indexing a nil class? In the case we dont have data here should we remove nils from the map? Should we default to an empty string?
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.
Yes it was nil. All other fields in this pipeline are not showing any meaningful data, it only gives empty array or null. This monitoring feature is deprecated for years. I think we have good enough reason to not set a default value here and just show null
💛 Build succeeded, but was flaky
Failed CI StepsHistory
|
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.
LGTM!
Fixed an issue where the `/_node/stats` API displayed empty pipeline metrics when X-Pack monitoring was enabled (cherry picked from commit 8678581)
Fixed an issue where the `/_node/stats` API displayed empty pipeline metrics when X-Pack monitoring was enabled (cherry picked from commit 8678581)
@logstashmachine backport 8.18 |
@logstashmachine backport 9.0 |
Fixed an issue where the `/_node/stats` API displayed empty pipeline metrics when X-Pack monitoring was enabled (cherry picked from commit 8678581)
Fixed an issue where the `/_node/stats` API displayed empty pipeline metrics when X-Pack monitoring was enabled (cherry picked from commit 8678581)
Release notes
Fixed an issue where the
/_node/stats
API displayed empty pipeline metrics when X-Pack monitoring was enabledWhat does this PR do?
When monitoring is enabled, the metrics store does not initialise data for monitoring pipeline. The api has null pointer when fetching the pipeline config like workers, batch_size.
Why is it important/What is the impact to the user?
/_node/stats
gives emptypipelines: {}
Checklist
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs