diff --git a/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.md b/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.md index 0551a217520ad..3d3b73ccda25f 100644 --- a/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.md @@ -17,4 +17,5 @@ export interface StatusServiceSetup | Property | Type | Description | | --- | --- | --- | | [core$](./kibana-plugin-core-server.statusservicesetup.core_.md) | Observable<CoreStatus> | Current status for all Core services. | +| [overall$](./kibana-plugin-core-server.statusservicesetup.overall_.md) | Observable<ServiceStatus> | Overall system status for all of Kibana. | diff --git a/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.overall_.md b/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.overall_.md new file mode 100644 index 0000000000000..bb7c31311d520 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.statusservicesetup.overall_.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [StatusServiceSetup](./kibana-plugin-core-server.statusservicesetup.md) > [overall$](./kibana-plugin-core-server.statusservicesetup.overall_.md) + +## StatusServiceSetup.overall$ property + +Overall system status for all of Kibana. + +Signature: + +```typescript +overall$: Observable; +``` + +## Remarks + +The level of the overall status will reflect the most severe status of any core service or plugin. + +Exposed only for reporting purposes to outside systems and should not be used by plugins. Instead, plugins should only depend on the statuses of [Core](./kibana-plugin-core-server.statusservicesetup.core_.md) or their dependencies. + diff --git a/src/core/server/legacy/legacy_service.ts b/src/core/server/legacy/legacy_service.ts index 0c1e8562a1deb..f39282a6f9cb0 100644 --- a/src/core/server/legacy/legacy_service.ts +++ b/src/core/server/legacy/legacy_service.ts @@ -322,6 +322,7 @@ export class LegacyService implements CoreService { }, status: { core$: setupDeps.core.status.core$, + overall$: setupDeps.core.status.overall$, }, uiSettings: { register: setupDeps.core.uiSettings.register, diff --git a/src/core/server/plugins/plugin_context.ts b/src/core/server/plugins/plugin_context.ts index 5235f3ee6d580..62058f6d478e7 100644 --- a/src/core/server/plugins/plugin_context.ts +++ b/src/core/server/plugins/plugin_context.ts @@ -178,6 +178,7 @@ export function createPluginSetupContext( }, status: { core$: deps.status.core$, + overall$: deps.status.overall$, }, uiSettings: { register: deps.uiSettings.register, diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index afc71d39d4a62..cd7f4973f886c 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -2802,6 +2802,7 @@ export type StartServicesAccessor; + overall$: Observable; } // @public diff --git a/src/core/server/status/status_service.mock.ts b/src/core/server/status/status_service.mock.ts index c6eb11be6967c..47ef8659b4079 100644 --- a/src/core/server/status/status_service.mock.ts +++ b/src/core/server/status/status_service.mock.ts @@ -39,6 +39,7 @@ const availableCoreStatus: CoreStatus = { const createSetupContractMock = () => { const setupContract: jest.Mocked = { core$: new BehaviorSubject(availableCoreStatus), + overall$: new BehaviorSubject(available), }; return setupContract; diff --git a/src/core/server/status/types.ts b/src/core/server/status/types.ts index b04c25a1eee93..2ecf11deb2960 100644 --- a/src/core/server/status/types.ts +++ b/src/core/server/status/types.ts @@ -123,13 +123,20 @@ export interface StatusServiceSetup { * Current status for all Core services. */ core$: Observable; -} -/** @internal */ -export interface InternalStatusServiceSetup extends StatusServiceSetup { /** - * Overall system status used for HTTP API + * Overall system status for all of Kibana. + * + * @remarks + * The level of the overall status will reflect the most severe status of any core service or plugin. + * + * Exposed only for reporting purposes to outside systems and should not be used by plugins. Instead, plugins should + * only depend on the statuses of {@link StatusServiceSetup.core$ | Core} or their dependencies. */ overall$: Observable; +} + +/** @internal */ +export interface InternalStatusServiceSetup extends StatusServiceSetup { isStatusPageAnonymous: () => boolean; }