aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Sullivan <tsullivan@users.noreply.github.com>2018-05-31 15:18:02 -0700
committerGitHub <noreply@github.com>2018-05-31 15:18:02 -0700
commita801752e790b2611cd9a10ebd014d3950c21b3bd (patch)
tree190130f244bb4c4fb6cd8d5edfba328ef5d93f3a
parent8f206db2c50349fa63a10fd6a8399a924ba0ee1c (diff)
[Reporting/Usage] Check monitoring enabled before registering collector (#19581)
-rw-r--r--x-pack/plugins/reporting/index.js2
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));