[Reporting/Usage] Check monitoring enabled before registering collector (#19581)
This commit is contained in:
parent
8f206db2c5
commit
a801752e79
|
@ -158,7 +158,7 @@ export const reporting = (kibana) => {
|
|||
});
|
||||
|
||||
// Register a function to with Monitoring to manage the collection of usage stats
|
||||
monitoringPlugin.status.once('green', () => {
|
||||
monitoringPlugin && monitoringPlugin.status.once('green', () => {
|
||||
if (monitoringPlugin.collectorSet) {
|
||||
const callCluster = callClusterFactory(server).getCallClusterInternal(); // uses callWithInternal as this is for internal collection
|
||||
monitoringPlugin.collectorSet.register(getReportingUsageCollector(server, callCluster));
|
||||
|
|
Loading…
Reference in a new issue