kibana/x-pack/plugins/monitoring/server/telemetry_collection/register_monitoring_collection.ts
Pierre Gayvallet fe1c508d8d
Move and rename legacy elasticsearch client (#69797)
* move last snapshot to inline

* move legacy files to legacy subfolder

* move request types out of legacy

* export Headers from http instead of elasticsearch

* renaming - first pass

* renaming - second pass

* fix core mocks

* adapt new calls

* update generated doc

* fix IT test mocks

* fix new usages
2020-06-29 17:43:31 +02:00

27 lines
997 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { ILegacyCustomClusterClient } from 'kibana/server';
import { TelemetryCollectionManagerPluginSetup } from 'src/plugins/telemetry_collection_manager/server';
import { getAllStats, CustomContext } from './get_all_stats';
import { getClusterUuids } from './get_cluster_uuids';
import { getLicenses } from './get_licenses';
export function registerMonitoringCollection(
telemetryCollectionManager: TelemetryCollectionManagerPluginSetup,
esCluster: ILegacyCustomClusterClient,
customContext: CustomContext
) {
telemetryCollectionManager.setCollection({
esCluster,
title: 'monitoring',
priority: 2,
statsGetter: getAllStats,
clusterDetailsGetter: getClusterUuids,
licenseGetter: getLicenses,
customContext,
});
}