Skip to content

Commit

Permalink
Remove Stats API (#13896)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Sep 12, 2017
1 parent 1bbde73 commit 33aa0f4
Showing 1 changed file with 3 additions and 13 deletions.
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);
}
});
}

0 comments on commit 33aa0f4

Please sign in to comment.