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

Remove Stats API #13896

Merged
merged 1 commit into from
Sep 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions src/server/stats/stats_mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export function statsMixin(kbnServer, server) {
* @name server.getKibanaStats
* @param {Object} options
* @property {Function} options.callCluster method for calling the elasticsearch cluster
*
* NOTE: this API will be moved out to an external plugin in 6.1, and likely
* have breaking changes in the format of the response data
*/
server.decorate('server', 'getKibanaStats', async ({ callCluster }) => {
const savedObjectsClient = server.savedObjectsClientFactory({ callCluster });
Expand All @@ -15,17 +18,4 @@ export function statsMixin(kbnServer, server) {
savedObjectsClient
);
});

server.route({
method: 'GET',
path: '/api/stats',
handler: function (request, reply) {
const stats = getStats(
server.config().get('kibana.index'),
request.getSavedObjectsClient()
);

return reply(stats);
}
});
}