-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[5.x][status api] opt in to v6 metrics #10481
Conversation
src/server/status/index.js
Outdated
metrics: kbnServer.v6Metrics | ||
}); | ||
} | ||
|
||
return reply({ |
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 return should be legacy format with without the nested version information. Metrics also needs to be of the legacy format.
src/server/status/metrics.js
Outdated
kbnServer.metrics = new Samples(12); | ||
|
||
server.plugins['even-better'].monitor.on('ops', function (event) { | ||
kbnServer.v6Metrics = getV6Metrics({ event, config }); |
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.
What are your thoughts on swapping this, creating kbnServer.legacyMetrics
. Reason being is we are exposing the cgroup information via this interface.
src/server/config/schema.js
Outdated
@@ -148,7 +148,8 @@ module.exports = () => Joi.object({ | |||
}).default(), | |||
|
|||
status: Joi.object({ | |||
allowAnonymous: Joi.boolean().default(false) | |||
allowAnonymous: Joi.boolean().default(false), | |||
v6Api: Joi.boolean().default(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.
We should default this to false.
jenkins, test this |
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
This is an opt-in backport of #10180, returning only the latest metrics from the status api. It can be enabled by setting
status.v6ApiFormat: true
in kibana.yml