diff options
author | Tim Sullivan <tsullivan@users.noreply.github.com> | 2018-05-31 15:18:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 15:18:02 -0700 |
commit | a801752e790b2611cd9a10ebd014d3950c21b3bd (patch) | |
tree | 190130f244bb4c4fb6cd8d5edfba328ef5d93f3a | |
parent | 8f206db2c50349fa63a10fd6a8399a924ba0ee1c (diff) |
[Reporting/Usage] Check monitoring enabled before registering collector (#19581)
-rw-r--r-- | x-pack/plugins/reporting/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/x-pack/plugins/reporting/index.js b/x-pack/plugins/reporting/index.js index 4e4b2d18e..a5d6c7e6b 100644 --- a/x-pack/plugins/reporting/index.js +++ b/x-pack/plugins/reporting/index.js @@ -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)); |