setupIngestManager called awaitIfPending called awaitIfPending try createSetupSideEffects called createSetupSideEffects call ensureDefault*, etc in parallel. wait for result ensureInstalledPackage system undefined ensureInstalledPackage system installLatestPackage ensureInstalledPackage endpoint undefined ensureInstalledPackage endpoint installLatestPackage installPackage endpoint-0.16.0-dev.0 installPackage system-0.5.4 installPackage installedPkg undefined installPackage installedPkg undefined installPackage endpoint-0.16.0-dev.0 createInstallation { pkgName: 'endpoint', pkgVersion: '0.16.0-dev.0', internal: false, removable: false, installed_kibana: [], installed_es: [], toSaveESIndexPatterns: { alerts: 'logs-endpoint.alerts-*', file: 'logs-endpoint.events.file-*', library: 'logs-endpoint.events.library-*', metadata: 'metrics-endpoint.metadata-*', metadata_current: 'metrics-endpoint.metadata_current-*', metrics: 'metrics-endpoint.metrics-*', network: 'logs-endpoint.events.network-*', policy: 'metrics-endpoint.policy-*', process: 'logs-endpoint.events.process-*', registry: 'logs-endpoint.events.registry-*', security: 'logs-endpoint.events.security-*' } } installPackage system-0.5.4 createInstallation { pkgName: 'system', pkgVersion: '0.5.4', internal: false, removable: false, installed_kibana: [], installed_es: [], toSaveESIndexPatterns: { auth: 'logs-system.auth-*', core: 'metrics-system.core-*', cpu: 'metrics-system.cpu-*', diskio: 'metrics-system.diskio-*', entropy: 'metrics-system.entropy-*', filesystem: 'metrics-system.filesystem-*', fsstat: 'metrics-system.fsstat-*', load: 'metrics-system.load-*', memory: 'metrics-system.memory-*', network: 'metrics-system.network-*', network_summary: 'metrics-system.network_summary-*', process: 'metrics-system.process-*', process_summary: 'metrics-system.process_summary-*', raid: 'metrics-system.raid-*', service: 'metrics-system.service-*', socket: 'metrics-system.socket-*', socket_summary: 'metrics-system.socket_summary-*', syslog: 'logs-system.syslog-*', uptime: 'metrics-system.uptime-*', users: 'metrics-system.users-*' } } installPackage endpoint save new kibana refs before installing the assets installPackage endpoint saveKibanaAssetsRefs installPackage system save new kibana refs before installing the assets installPackage system saveKibanaAssetsRefs installPackage endpoint installKibanaAssets saveInstalledEsRefs endpoint given [ { id: 'logs-endpoint.alerts-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.file-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.library-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.metadata-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.metrics-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.network-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.policy-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.process-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.registry-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.security-0.16.0-dev.0', type: 'ingest_pipeline' } ] installPackage system installKibanaAssets saveInstalledEsRefs system given [ { id: 'logs-system.auth-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.auth-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.syslog-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.syslog-0.5.4', type: 'ingest_pipeline' } ] saveInstalledEsRefs endpoint set installed_es to [ { id: 'logs-endpoint.alerts-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.file-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.library-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.metadata-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.metrics-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.network-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.policy-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.process-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.registry-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.security-0.16.0-dev.0', type: 'ingest_pipeline' } ] saveInstalledEsRefs system set installed_es to [ { id: 'logs-system.auth-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.auth-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.syslog-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.syslog-0.5.4', type: 'ingest_pipeline' } ] saveInstalledEsRefs endpoint given [ { id: 'logs-endpoint.alerts', type: 'index_template' }, { id: 'logs-endpoint.events.file', type: 'index_template' }, { id: 'logs-endpoint.events.library', type: 'index_template' }, { id: 'metrics-endpoint.metadata', type: 'index_template' }, { id: 'metrics-endpoint.metadata_current', type: 'index_template' }, { id: 'metrics-endpoint.metrics', type: 'index_template' }, { id: 'logs-endpoint.events.network', type: 'index_template' }, { id: 'metrics-endpoint.policy', type: 'index_template' }, { id: 'logs-endpoint.events.process', type: 'index_template' }, { id: 'logs-endpoint.events.registry', type: 'index_template' }, { id: 'logs-endpoint.events.security', type: 'index_template' } ] saveInstalledEsRefs endpoint set installed_es to [ { id: 'logs-endpoint.alerts-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.file-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.library-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.metadata-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.metrics-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.network-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.policy-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.process-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.registry-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.security-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.alerts', type: 'index_template' }, { id: 'logs-endpoint.events.file', type: 'index_template' }, { id: 'logs-endpoint.events.library', type: 'index_template' }, { id: 'metrics-endpoint.metadata', type: 'index_template' }, { id: 'metrics-endpoint.metadata_current', type: 'index_template' }, { id: 'metrics-endpoint.metrics', type: 'index_template' }, { id: 'logs-endpoint.events.network', type: 'index_template' }, { id: 'metrics-endpoint.policy', type: 'index_template' }, { id: 'logs-endpoint.events.process', type: 'index_template' }, { id: 'logs-endpoint.events.registry', type: 'index_template' }, { id: 'logs-endpoint.events.security', type: 'index_template' } ] saveInstalledEsRefs system given [ { id: 'logs-system.auth', type: 'index_template' }, { id: 'metrics-system.core', type: 'index_template' }, { id: 'metrics-system.cpu', type: 'index_template' }, { id: 'metrics-system.diskio', type: 'index_template' }, { id: 'metrics-system.entropy', type: 'index_template' }, { id: 'metrics-system.filesystem', type: 'index_template' }, { id: 'metrics-system.fsstat', type: 'index_template' }, { id: 'metrics-system.load', type: 'index_template' }, { id: 'metrics-system.memory', type: 'index_template' }, { id: 'metrics-system.network', type: 'index_template' }, { id: 'metrics-system.network_summary', type: 'index_template' }, { id: 'metrics-system.process', type: 'index_template' }, { id: 'metrics-system.process_summary', type: 'index_template' }, { id: 'metrics-system.raid', type: 'index_template' }, { id: 'metrics-system.service', type: 'index_template' }, { id: 'metrics-system.socket', type: 'index_template' }, { id: 'metrics-system.socket_summary', type: 'index_template' }, { id: 'logs-system.syslog', type: 'index_template' }, { id: 'metrics-system.uptime', type: 'index_template' }, { id: 'metrics-system.users', type: 'index_template' } ] saveInstalledEsRefs system set installed_es to [ { id: 'logs-system.auth-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.auth-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.syslog-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.syslog-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.auth', type: 'index_template' }, { id: 'metrics-system.core', type: 'index_template' }, { id: 'metrics-system.cpu', type: 'index_template' }, { id: 'metrics-system.diskio', type: 'index_template' }, { id: 'metrics-system.entropy', type: 'index_template' }, { id: 'metrics-system.filesystem', type: 'index_template' }, { id: 'metrics-system.fsstat', type: 'index_template' }, { id: 'metrics-system.load', type: 'index_template' }, { id: 'metrics-system.memory', type: 'index_template' }, { id: 'metrics-system.network', type: 'index_template' }, { id: 'metrics-system.network_summary', type: 'index_template' }, { id: 'metrics-system.process', type: 'index_template' }, { id: 'metrics-system.process_summary', type: 'index_template' }, { id: 'metrics-system.raid', type: 'index_template' }, { id: 'metrics-system.service', type: 'index_template' }, { id: 'metrics-system.socket', type: 'index_template' }, { id: 'metrics-system.socket_summary', type: 'index_template' }, { id: 'logs-system.syslog', type: 'index_template' }, { id: 'metrics-system.uptime', type: 'index_template' }, { id: 'metrics-system.users', type: 'index_template' } ] installTransformForDataset endpoint installTransformForDataset endpoint await deleteTransforms [] deleteTransforms [] saveInstalledEsRefs endpoint given [ { id: 'metrics-endpoint.metadata-current-default-0.16.0-dev.0', type: 'transform' } ] saveInstalledEsRefs endpoint set installed_es to [ { id: 'logs-endpoint.alerts-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.file-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.library-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.metadata-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.metrics-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.network-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'metrics-endpoint.policy-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.process-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.registry-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.events.security-0.16.0-dev.0', type: 'ingest_pipeline' }, { id: 'logs-endpoint.alerts', type: 'index_template' }, { id: 'logs-endpoint.events.file', type: 'index_template' }, { id: 'logs-endpoint.events.library', type: 'index_template' }, { id: 'metrics-endpoint.metadata', type: 'index_template' }, { id: 'metrics-endpoint.metadata_current', type: 'index_template' }, { id: 'metrics-endpoint.metrics', type: 'index_template' }, { id: 'logs-endpoint.events.network', type: 'index_template' }, { id: 'metrics-endpoint.policy', type: 'index_template' }, { id: 'logs-endpoint.events.process', type: 'index_template' }, { id: 'logs-endpoint.events.registry', type: 'index_template' }, { id: 'logs-endpoint.events.security', type: 'index_template' }, { id: 'metrics-endpoint.metadata-current-default-0.16.0-dev.0', type: 'transform' } ] installTransformForDataset system installTransformForDataset system await deleteTransforms [] deleteTransforms [] leaving installPackage system installedTransforms [] leaving installPackage endpoint installedTransforms [ { id: 'metrics-endpoint.metadata-current-default-0.16.0-dev.0', type: 'transform' } ] createSetupSideEffects ensureDefault*, etc worked system === system? true createSetupSideEffects system should be installed? true createSetupSideEffects system is installed? false createSetupSideEffects system addPackageToAgentPolicy ensureInstalledPackage system { installed_kibana: [ { id: 'system-0d3f2380-fa78-11e6-ae9b-81e5311e8cab-ecs', type: 'dashboard' }, { id: 'system-277876d0-fa2c-11e6-bbd3-29c986c96e5a-ecs', type: 'dashboard' }, { id: 'system-5517a150-f9ce-11e6-8115-a7c18106d86a-ecs', type: 'dashboard' }, { id: 'system-79ffd6e0-faa0-11e6-947f-177f697178b8-ecs', type: 'dashboard' }, { id: 'system-CPU-slash-Memory-per-container-ecs', type: 'dashboard' }, { id: 'system-Filebeat-syslog-dashboard-ecs', type: 'dashboard' }, { id: 'system-Metrics-system-overview-ecs', type: 'dashboard' }, { id: 'system-c431f410-f9ac-11e9-90e8-1fb18e796788', type: 'dashboard' }, { id: '62439dc0-f9c9-11e6-a747-6121780e0414-ecs', type: 'search' }, { id: '8030c1b0-fa77-11e6-ae9b-81e5311e8cab-ecs', type: 'search' }, { id: 'Syslog-system-logs-ecs', type: 'search' }, { id: 'b6f321e0-fa25-11e6-bbd3-29c986c96e5a-ecs', type: 'search' }, { id: 'eb0039f0-fa7f-11e6-a1df-a78bd7504d38-ecs', type: 'search' }, { id: '089b85d0-1b16-11e7-b09e-037021c4f8df-ecs', type: 'visualization' }, { id: '12667040-fa80-11e6-a1df-a78bd7504d38-ecs', type: 'visualization' }, { id: '19e123b0-4d5a-11e7-aee5-fdc812cc3bec-ecs', type: 'visualization' }, { id: '1aae9140-1b93-11e7-8ada-3df93aab833e-ecs', type: 'visualization' }, { id: '26732e20-1b91-11e7-bec4-a5e9ec5cab8b-ecs', type: 'visualization' }, { id: '2e224660-1b19-11e7-b09e-037021c4f8df-ecs', type: 'visualization' }, { id: '327417e0-8462-11e7-bab8-bd2f0fb42c54-ecs', type: 'visualization' }, { id: '341ffe70-f9ce-11e6-8115-a7c18106d86a-ecs', type: 'visualization' }, { id: '346bb290-fa80-11e6-a1df-a78bd7504d38-ecs', type: 'visualization' }, { id: '34f97ee0-1b96-11e7-8ada-3df93aab833e-ecs', type: 'visualization' }, { id: '3cec3eb0-f9d3-11e6-8a3e-2b904044ea1d-ecs', type: 'visualization' }, { id: '3d65d450-a9c3-11e7-af20-67db8aecb295-ecs', type: 'visualization' }, { id: '4b254630-f998-11e9-90e8-1fb18e796788', type: 'visualization' }, { id: '4d546850-1b15-11e7-b09e-037021c4f8df-ecs', type: 'visualization' }, { id: '4e4bb1e0-1b1b-11e7-b09e-037021c4f8df-ecs', type: 'visualization' }, { id: '51164310-fa2b-11e6-bbd3-29c986c96e5a-ecs', type: 'visualization' }, { id: '522ee670-1b92-11e7-bec4-a5e9ec5cab8b-ecs', type: 'visualization' }, { id: '590a60f0-5d87-11e7-8884-1bb4c3b890e4-ecs', type: 'visualization' }, { id: '5c7af030-fa2a-11e6-bbd3-29c986c96e5a-ecs', type: 'visualization' }, { id: '5dd15c00-fa78-11e6-ae9b-81e5311e8cab-ecs', type: 'visualization' }, { id: '6b7b9a40-faa1-11e6-86b1-cd7735ff7e23-ecs', type: 'visualization' }, { id: '78b74f30-f9cd-11e6-8115-a7c18106d86a-ecs', type: 'visualization' }, { id: '7cdb1330-4d1a-11e7-a196-69b9a7a020a9-ecs', type: 'visualization' }, { id: '825fdb80-4d1d-11e7-b5f2-2b7c1895bf32-ecs', type: 'visualization' }, { id: '83e12df0-1b91-11e7-bec4-a5e9ec5cab8b-ecs', type: 'visualization' }, { id: '855899e0-1b1c-11e7-b09e-037021c4f8df-ecs', type: 'visualization' }, { id: '8c071e20-f999-11e9-90e8-1fb18e796788', type: 'visualization' }, { id: '96976150-4d5d-11e7-aa29-87a97a796de6-ecs', type: 'visualization' }, { id: '99381c80-4d60-11e7-9a4c-ed99bbcaa42b-ecs', type: 'visualization' }, { id: '9c69cad0-f9b0-11e9-90e8-1fb18e796788', type: 'visualization' }, { id: 'Container-Block-IO-ecs', type: 'visualization' }, { id: 'Container-CPU-usage-ecs', type: 'visualization' }, { id: 'Container-Memory-stats-ecs', type: 'visualization' }, { id: 'Syslog-events-by-hostname-ecs', type: 'visualization' }, { id: 'Syslog-hostnames-and-processes-ecs', type: 'visualization' }, { id: 'System-Navigation-ecs', type: 'visualization' }, { id: 'a30871f0-f98f-11e9-90e8-1fb18e796788', type: 'visualization' }, { id: 'ab2d1e90-1b1a-11e7-b09e-037021c4f8df-ecs', type: 'visualization' }, { id: 'bb3a8720-f991-11e9-90e8-1fb18e796788', type: 'visualization' }, { id: 'bfa5e400-1b16-11e7-b09e-037021c4f8df-ecs', type: 'visualization' }, { id: 'c5e3cf90-4d60-11e7-9a4c-ed99bbcaa42b-ecs', type: 'visualization' }, { id: 'c6f2ffd0-4d17-11e7-a196-69b9a7a020a9-ecs', type: 'visualization' }, { id: 'd16bb400-f9cc-11e6-8115-a7c18106d86a-ecs', type: 'visualization' }, { id: 'd2e80340-4d5c-11e7-aa29-87a97a796de6-ecs', type: 'visualization' }, { id: 'd3166e80-1b91-11e7-bec4-a5e9ec5cab8b-ecs', type: 'visualization' }, { id: 'd3f51850-f9b6-11e9-90e8-1fb18e796788', type: 'visualization' }, { id: 'd56ee420-fa79-11e6-a1df-a78bd7504d38-ecs', type: 'visualization' }, { id: 'dc589770-fa2b-11e6-bbd3-29c986c96e5a-ecs', type: 'visualization' }, { id: 'e0f001c0-1b18-11e7-b09e-037021c4f8df-ecs', type: 'visualization' }, { id: 'e121b140-fa78-11e6-a1df-a78bd7504d38-ecs', type: 'visualization' }, { id: 'e6e639e0-f992-11e9-90e8-1fb18e796788', type: 'visualization' }, { id: 'f398d2f0-fa77-11e6-ae9b-81e5311e8cab-ecs', type: 'visualization' }, { id: 'fe064790-1b1f-11e7-bec4-a5e9ec5cab8b-ecs', type: 'visualization' } ], installed_es: [ { id: 'logs-system.auth-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.auth-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.syslog-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.syslog-0.5.4', type: 'ingest_pipeline' }, { id: 'logs-system.auth', type: 'index_template' }, { id: 'metrics-system.core', type: 'index_template' }, { id: 'metrics-system.cpu', type: 'index_template' }, { id: 'metrics-system.diskio', type: 'index_template' }, { id: 'metrics-system.entropy', type: 'index_template' }, { id: 'metrics-system.filesystem', type: 'index_template' }, { id: 'metrics-system.fsstat', type: 'index_template' }, { id: 'metrics-system.load', type: 'index_template' }, { id: 'metrics-system.memory', type: 'index_template' }, { id: 'metrics-system.network', type: 'index_template' }, { id: 'metrics-system.network_summary', type: 'index_template' }, { id: 'metrics-system.process', type: 'index_template' }, { id: 'metrics-system.process_summary', type: 'index_template' }, { id: 'metrics-system.raid', type: 'index_template' }, { id: 'metrics-system.service', type: 'index_template' }, { id: 'metrics-system.socket', type: 'index_template' }, { id: 'metrics-system.socket_summary', type: 'index_template' }, { id: 'logs-system.syslog', type: 'index_template' }, { id: 'metrics-system.uptime', type: 'index_template' }, { id: 'metrics-system.users', type: 'index_template' } ], es_index_patterns: { auth: 'logs-system.auth-*', core: 'metrics-system.core-*', cpu: 'metrics-system.cpu-*', diskio: 'metrics-system.diskio-*', entropy: 'metrics-system.entropy-*', filesystem: 'metrics-system.filesystem-*', fsstat: 'metrics-system.fsstat-*', load: 'metrics-system.load-*', memory: 'metrics-system.memory-*', network: 'metrics-system.network-*', network_summary: 'metrics-system.network_summary-*', process: 'metrics-system.process-*', process_summary: 'metrics-system.process_summary-*', raid: 'metrics-system.raid-*', service: 'metrics-system.service-*', socket: 'metrics-system.socket-*', socket_summary: 'metrics-system.socket_summary-*', syslog: 'logs-system.syslog-*', uptime: 'metrics-system.uptime-*', users: 'metrics-system.users-*' }, name: 'system', version: '0.5.4', internal: false, removable: false, install_version: '0.5.4', install_status: 'installed', install_started_at: '2020-09-16T13:31:44.601Z' } endpoint === system? false createSetupSideEffects endpoint should be installed? false createSetupSideEffects return { isIntialized: true } awaitIfPending ok. result: { isIntialized: true } awaitIfPending onResolve(result) awaitIfPending isPending=false false awaitIfPending end. return a promise which will resolve/reject Promise { { isIntialized: true } }