Skip to content

Commit a4b3bca

Browse files
Merge branch 'master' into fix/payload-bytes
2 parents 07b5bea + b1d76ce commit a4b3bca

File tree

321 files changed

+4159658
-4289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+4159658
-4289
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/
251251
/x-pack/test/security_api_integration/ @elastic/kibana-security
252252
/x-pack/test/security_functional/ @elastic/kibana-security
253253
/x-pack/test/spaces_api_integration/ @elastic/kibana-security
254+
/x-pack/test/saved_object_api_integration/ @elastic/kibana-security
254255
#CC# /x-pack/plugins/security/ @elastic/kibana-security
255256

256257
# Kibana Alerting Services

dev_docs/kibana_platform_plugin_intro.mdx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ date: 2021-01-06
77
tags: ['kibana','onboarding', 'dev', 'architecture']
88
---
99

10-
From an end user perspective, Kibana is a tool for interacting with Elasticsearch, providing an easy way
10+
From an end user perspective, Kibana is a tool for interacting with Elasticsearch, providing an easy way
1111
to visualize and analyze data.
1212

1313
From a developer perspective, Kibana is a platform that provides a set of tools to build not only the UI you see in Kibana today, but
14-
a wide variety of applications that can be used to explore, visualize, and act upon data in Elasticsearch. The platform provides developers the ability
15-
to build applications, or inject extra functionality into
14+
a wide variety of applications that can be used to explore, visualize, and act upon data in Elasticsearch. The platform provides developers the ability
15+
to build applications, or inject extra functionality into
1616
already existing applications. Did you know that almost everything you see in the
1717
Kibana UI is built inside a plugin? If you removed all plugins from Kibana, you'd be left with an empty navigation menu, and a set of
1818
developer tools. The Kibana platform is a blank canvas, just waiting for a developer to come along and create something!
1919

2020
![Kibana personas](assets/kibana_platform_plugin_end_user.png)
21-
21+
2222
## Platform services
2323

2424
Plugins have access to three kinds of public services:
2525

2626
- Platform services provided by `core` (<DocLink id="kibPlatformIntro" section="core-services" text="Core services"/>)
2727
- Platform services provided by plugins (<DocLink id="kibPlatformIntro" section="platform-plugins" text="Platform plugins"/>)
28-
- Shared services provided by plugins, that are only relevant for only a few, specific plugins (e.g. "presentation utils").
28+
- Shared services provided by plugins, that are only relevant for only a few, specific plugins (e.g. "presentation utils").
2929

3030
The first two items are what make up "Platform services".
3131

@@ -37,9 +37,9 @@ clear, and we haven't done a great job of sticking to it. For example, notificat
3737
Today it looks something like this.
3838

3939
![Core vs platform plugins vs plugins](assets/platform_plugins_core.png)
40-
40+
4141
<DocAccordion buttonContent="A bit of history">
42-
When the Kibana platform and plugin infrastructure was built, we thought of two types of code: core services, and other plugin services. We planned to keep the most stable and fundamental
42+
When the Kibana platform and plugin infrastructure was built, we thought of two types of code: core services, and other plugin services. We planned to keep the most stable and fundamental
4343
code needed to build plugins inside core.
4444

4545
In reality, we ended up with many platform-like services living outside of core, with no (short term) intention of moving them. We highly encourage plugin developers to use
@@ -54,7 +54,7 @@ In reality, our plugin model ended up being used like micro-services. Plugins ar
5454
they desire, without the need to build a plugin.
5555

5656
Another side effect of having many small plugins is that common code often ends up extracted into another plugin. Use case specific utilities are exported,
57-
that are not meant to be used in a general manner. This makes our definition of "platform code" a bit trickier to define. We'd like to say "The platform is made up of
57+
that are not meant to be used in a general manner. This makes our definition of "platform code" a bit trickier to define. We'd like to say "The platform is made up of
5858
every publically exposed service", but in today's world, that wouldn't be a very accurate picture.
5959

6060
We recognize the need to better clarify the relationship between core functionality, platform-like plugin functionality, and functionality exposed by other plugins.
@@ -69,19 +69,19 @@ We will continue to focus on adding clarity around these types of services and w
6969
### Core services
7070

7171
Sometimes referred to just as Core, Core services provide the most basic and fundamental tools neccessary for building a plugin, like creating saved objects,
72-
routing, application registration, and notifications. The Core platform is not a plugin itself, although
72+
routing, application registration, notifications and <DocLink id="kibCoreLogging" text="logging"/>. The Core platform is not a plugin itself, although
7373
there are some plugins that provide platform functionality. We call these <DocLink id="kibPlatformIntro" section="platform-plugins" text="Platform plugins"/>.
7474

7575
### Platform plugins
7676

77-
Plugins that provide fundamental services and functionality to extend and customize Kibana, for example, the
77+
Plugins that provide fundamental services and functionality to extend and customize Kibana, for example, the
7878
<DocLink id="kibDataPlugin" text="data"/> plugin. There is no official way to tell if a plugin is a platform plugin or not.
7979
Platform plugins are _usually_ plugins that are managed by the Platform Group, but we are starting to see some exceptions.
8080

8181
## Plugins
8282

83-
Plugins are code that is written to extend and customize Kibana. Plugin's don't have to be part of the Kibana repo, though the Kibana
84-
repo does contain many plugins! Plugins add customizations by
83+
Plugins are code that is written to extend and customize Kibana. Plugin's don't have to be part of the Kibana repo, though the Kibana
84+
repo does contain many plugins! Plugins add customizations by
8585
using <DocLink id="kibPlatformIntro" section="extension-points" text="extension points"/> provided by <DocLink id="kibPlatformIntro" section="platform-services" text="platform services"/>.
8686
Sometimes people confuse the term "plugin" and "application". While often there is a 1:1 relationship between a plugin and an application, it is not always the case.
8787
A plugin may register many applications, or none.
@@ -97,7 +97,7 @@ adding it to core's application <DocLink id="kibPlatformIntro" section="registry
9797

9898
### Public plugin API
9999

100-
A plugin's public API consists of everything exported from a plugin's <DocLink id="kibPlatformIntro" section="plugin-lifecycle" text="start or setup lifecycle methods"/>,
100+
A plugin's public API consists of everything exported from a plugin's <DocLink id="kibPlatformIntro" section="plugin-lifecycle" text="start or setup lifecycle methods"/>,
101101
as well as from the top level `index.ts` files that exist in the three "scope" folders:
102102

103103
- common/index.ts
@@ -113,18 +113,18 @@ Core, and plugins, expose different features at different parts of their lifecyc
113113
specifically-named functions on the service definition.
114114

115115
Kibana has three lifecycles: setup, start, and stop. Each plugin’s setup function is called sequentially while Kibana is setting up
116-
on the server or when it is being loaded in the browser. The start functions are called sequentially after setup has been completed for all plugins.
116+
on the server or when it is being loaded in the browser. The start functions are called sequentially after setup has been completed for all plugins.
117117
The stop functions are called sequentially while Kibana is gracefully shutting down the server or when the browser tab or window is being closed.
118118

119119
The table below explains how each lifecycle relates to the state of Kibana.
120120

121121
| lifecycle | purpose | server | browser |
122122
| ---------- | ------ | ------- | ----- |
123123
| setup | perform "registration" work to setup environment for runtime |configure REST API endpoint, register saved object types, etc. | configure application routes in SPA, register custom UI elements in extension points, etc. |
124-
| start | bootstrap runtime logic | respond to an incoming request, request Elasticsearch server, etc. | start polling Kibana server, update DOM tree in response to user interactions, etc.|
124+
| start | bootstrap runtime logic | respond to an incoming request, request Elasticsearch server, etc. | start polling Kibana server, update DOM tree in response to user interactions, etc.|
125125
| stop | cleanup runtime | dispose of active handles before the server shutdown. | store session data in the LocalStorage when the user navigates away from Kibana, etc. |
126126

127-
Different service interfaces can and will be passed to setup, start, and stop because certain functionality makes sense in the context of a running plugin while other types
127+
Different service interfaces can and will be passed to setup, start, and stop because certain functionality makes sense in the context of a running plugin while other types
128128
of functionality may have restrictions or may only make sense in the context of a plugin that is stopping.
129129

130130
## Extension points
@@ -141,4 +141,4 @@ plugins to customize the Kibana experience. Examples of extension points are:
141141

142142
## Follow up material
143143

144-
Learn how to build your own plugin by following <DocLink id="kibDevTutorialBuildAPlugin" />
144+
Learn how to build your own plugin by following <DocLink id="kibDevTutorialBuildAPlugin" />

docs/api/alerts/find.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Retrieve a paginated set of alerts based on condition.
4949
NOTE: As alerts change in {kib}, the results on each page of the response also
5050
change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data.
5151

52+
NOTE: Alert `params` are stored as {ref}/flattened.html[flattened] and analyzed as `keyword`.
53+
5254
[[alerts-api-find-request-codes]]
5355
==== Response code
5456

docs/development/core/public/kibana-plugin-core-public.appleavehandler.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
## AppLeaveHandler type
66

7+
> Warning: This API is now obsolete.
8+
>
9+
> [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md) has been deprecated in favor of [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md)
10+
>
11+
712
A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return `confirm` to to prompt a message to the user before leaving the page, or `default` to keep the default behavior (doing nothing).
813

914
See [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) for detailed usage examples.

docs/development/core/public/kibana-plugin-core-public.appmountparameters.onappleave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
## AppMountParameters.onAppLeave property
66

7+
> Warning: This API is now obsolete.
8+
>
9+
> [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md) should be used instead.
10+
>
11+
712
A function that can be used to register a handler that will be called when the user is leaving the current application, allowing to prompt a confirmation message before actually changing the page.
813

914
This will be called either when the user goes to another application, or when trying to close the tab or manually changing the url.

docs/development/core/public/kibana-plugin-core-public.scopedhistory.block.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@
44

55
## ScopedHistory.block property
66

7-
Not supported. Use [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md)<!-- -->.
7+
Add a block prompt requesting user confirmation when navigating away from the current page.
88

99
<b>Signature:</b>
1010

1111
```typescript
1212
block: (prompt?: string | boolean | History.TransitionPromptHook<HistoryLocationState> | undefined) => UnregisterCallback;
1313
```
14-
15-
## Remarks
16-
17-
We prefer that applications use the `onAppLeave` API because it supports a more graceful experience that prefers a modal when possible, falling back to a confirm dialog box in the beforeunload case.
18-

docs/development/core/public/kibana-plugin-core-public.scopedhistory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export declare class ScopedHistory<HistoryLocationState = unknown> implements Hi
2727
| Property | Modifiers | Type | Description |
2828
| --- | --- | --- | --- |
2929
| [action](./kibana-plugin-core-public.scopedhistory.action.md) | | <code>Action</code> | The last action dispatched on the history stack. |
30-
| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | <code>(prompt?: string &#124; boolean &#124; History.TransitionPromptHook&lt;HistoryLocationState&gt; &#124; undefined) =&gt; UnregisterCallback</code> | Not supported. Use [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md)<!-- -->. |
30+
| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | <code>(prompt?: string &#124; boolean &#124; History.TransitionPromptHook&lt;HistoryLocationState&gt; &#124; undefined) =&gt; UnregisterCallback</code> | Add a block prompt requesting user confirmation when navigating away from the current page. |
3131
| [createHref](./kibana-plugin-core-public.scopedhistory.createhref.md) | | <code>(location: LocationDescriptorObject&lt;HistoryLocationState&gt;, { prependBasePath }?: {</code><br/><code> prependBasePath?: boolean &#124; undefined;</code><br/><code> }) =&gt; Href</code> | Creates an href (string) to the location. If <code>prependBasePath</code> is true (default), it will prepend the location's path with the scoped history basePath. |
3232
| [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistory.md) | | <code>&lt;SubHistoryLocationState = unknown&gt;(basePath: string) =&gt; ScopedHistory&lt;SubHistoryLocationState&gt;</code> | Creates a <code>ScopedHistory</code> for a subpath of this <code>ScopedHistory</code>. Useful for applications that may have sub-apps that do not need access to the containing application's history. |
3333
| [go](./kibana-plugin-core-public.scopedhistory.go.md) | | <code>(n: number) =&gt; void</code> | Send the user forward or backwards in the history stack. |

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export interface SearchSourceFields
3232
| [source](./kibana-plugin-plugins-data-public.searchsourcefields.source.md) | <code>NameList</code> | |
3333
| [terminate\_after](./kibana-plugin-plugins-data-public.searchsourcefields.terminate_after.md) | <code>number</code> | |
3434
| [timeout](./kibana-plugin-plugins-data-public.searchsourcefields.timeout.md) | <code>string</code> | |
35+
| [trackTotalHits](./kibana-plugin-plugins-data-public.searchsourcefields.tracktotalhits.md) | <code>boolean &#124; number</code> | |
3536
| [type](./kibana-plugin-plugins-data-public.searchsourcefields.type.md) | <code>string</code> | |
3637
| [version](./kibana-plugin-plugins-data-public.searchsourcefields.version.md) | <code>boolean</code> | |
3738

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md) &gt; [trackTotalHits](./kibana-plugin-plugins-data-public.searchsourcefields.tracktotalhits.md)
4+
5+
## SearchSourceFields.trackTotalHits property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
trackTotalHits?: boolean | number;
11+
```

docs/user/alerting/defining-alerts.asciidoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ image::images/alert-flyout-sections.png[The three sections of an alert definitio
2222
All alert share the following four properties in common:
2323

2424
[role="screenshot"]
25-
image::images/alert-flyout-general-details.png[alt='All alerts have name, tags, check every, and notify every properties in common']
25+
image::images/alert-flyout-general-details.png[alt='All alerts have name, tags, check every, and notify properties in common']
2626

2727
Name:: The name of the alert. While this name does not have to be unique, the name can be referenced in actions and also appears in the searchable alert listing in the management UI. A distinctive name can help identify and find an alert.
2828
Tags:: A list of tag names that can be applied to an alert. Tags can help you organize and find alerts, because tags appear in the alert listing in the management UI which is searchable by tag.
2929
Check every:: This value determines how frequently the alert conditions below are checked. Note that the timing of background alert checks are not guaranteed, particularly for intervals of less than 10 seconds. See <<alerting-production-considerations>> for more information.
30-
Notify every:: This value limits how often actions are repeated when an alert instance remains active across alert checks. See <<alerting-concepts-suppressing-duplicate-notifications>> for more information.
30+
Notify:: This value limits how often actions are repeated when an alert instance remains active across alert checks. See <<alerting-concepts-suppressing-duplicate-notifications>> for more information. +
31+
- **Only on status change**: Actions are not repeated when an alert instance remains active across checks. Actions run only when the alert status changes.
32+
- **Every time alert is active**: Actions are repeated when an alert instance remains active across checks.
33+
- **On a custom action interval**: Actions are suppressed for the throttle interval, but repeat when an alert instance remains active across checks for a duration longer than the throttle interval.
34+
3135

3236
[float]
3337
[[defining-alerts-type-conditions]]

0 commit comments

Comments
 (0)