Skip to content

Commit 97de3b5

Browse files
Merge branch 'master' into cancel-browser-request
2 parents d291930 + af337ce commit 97de3b5

File tree

525 files changed

+11339
-5305
lines changed

Some content is hidden

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

525 files changed

+11339
-5305
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
# APM
6767
/x-pack/plugins/apm/ @elastic/apm-ui
6868
/x-pack/test/functional/apps/apm/ @elastic/apm-ui
69+
/x-pack/test/apm_api_integration/ @elastic/apm-ui
6970
/src/plugins/apm_oss/ @elastic/apm-ui
7071
/src/apm.js @elastic/kibana-core @vigneshshanmugam
7172
/packages/kbn-apm-config-loader/ @elastic/kibana-core @vigneshshanmugam
@@ -80,6 +81,7 @@
8081
/x-pack/plugins/apm/server/lib/rum_client @elastic/uptime
8182
/x-pack/plugins/apm/server/routes/rum_client.ts @elastic/uptime
8283
/x-pack/plugins/apm/server/projections/rum_page_load_transactions.ts @elastic/uptime
84+
/x-pack/test/apm_api_integration/tests/csm/ @elastic/uptime
8385

8486
# Beats
8587
/x-pack/plugins/beats_management/ @elastic/beats
@@ -99,7 +101,7 @@
99101

100102
# Observability UIs
101103
/x-pack/plugins/infra/ @elastic/logs-metrics-ui
102-
/x-pack/plugins/fleet/ @elastic/ingest-management
104+
/x-pack/plugins/fleet/ @elastic/fleet
103105
/x-pack/plugins/observability/ @elastic/observability-ui
104106
/x-pack/plugins/monitoring/ @elastic/stack-monitoring-ui
105107
/x-pack/plugins/uptime @elastic/uptime

.github/paths-labeller.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- "src/plugins/bfetch/**/*.*"
1111
- "Team:apm":
1212
- "x-pack/plugins/apm/**/*.*"
13-
- "Team:Ingest Management":
13+
- "Team:Fleet":
1414
- "x-pack/plugins/fleet/**/*.*"
1515
- "x-pack/test/fleet_api_integration/**/*.*"
1616
- "Team:uptime":

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchinterceptor.handlesearcherror.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
<b>Signature:</b>
88

99
```typescript
10-
protected handleSearchError(e: any, timeoutSignal: AbortSignal, options?: ISearchOptions): Error;
10+
protected handleSearchError(e: KibanaServerError | AbortError, timeoutSignal: AbortSignal, options?: ISearchOptions): Error;
1111
```
1212

1313
## Parameters
1414

1515
| Parameter | Type | Description |
1616
| --- | --- | --- |
17-
| e | <code>any</code> | |
17+
| e | <code>KibanaServerError &#124; AbortError</code> | |
1818
| timeoutSignal | <code>AbortSignal</code> | |
1919
| options | <code>ISearchOptions</code> | |
2020

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.fetch.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44

55
## SearchSource.fetch() method
66

7-
Fetch this source and reject the returned Promise on error
7+
> Warning: This API is now obsolete.
8+
>
9+
> Use fetch$ instead
10+
>
811
12+
Fetch this source and reject the returned Promise on error
913

1014
<b>Signature:</b>
1115

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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; [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) &gt; [fetch$](./kibana-plugin-plugins-data-public.searchsource.fetch_.md)
4+
5+
## SearchSource.fetch$() method
6+
7+
Fetch this source from Elasticsearch, returning an observable over the response(s)
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
fetch$(options?: ISearchOptions): import("rxjs").Observable<import("elasticsearch").SearchResponse<any>>;
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| options | <code>ISearchOptions</code> | |
20+
21+
<b>Returns:</b>
22+
23+
`import("rxjs").Observable<import("elasticsearch").SearchResponse<any>>`
24+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export declare class SearchSource
3333
| [createCopy()](./kibana-plugin-plugins-data-public.searchsource.createcopy.md) | | creates a copy of this search source (without its children) |
3434
| [destroy()](./kibana-plugin-plugins-data-public.searchsource.destroy.md) | | Completely destroy the SearchSource. {<!-- -->undefined<!-- -->} |
3535
| [fetch(options)](./kibana-plugin-plugins-data-public.searchsource.fetch.md) | | Fetch this source and reject the returned Promise on error |
36+
| [fetch$(options)](./kibana-plugin-plugins-data-public.searchsource.fetch_.md) | | Fetch this source from Elasticsearch, returning an observable over the response(s) |
3637
| [getField(field, recurse)](./kibana-plugin-plugins-data-public.searchsource.getfield.md) | | Gets a single field from the fields |
3738
| [getFields()](./kibana-plugin-plugins-data-public.searchsource.getfields.md) | | returns all search source fields |
3839
| [getId()](./kibana-plugin-plugins-data-public.searchsource.getid.md) | | returns search source id |

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchtimeouterror._constructor_.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Constructs a new instance of the `SearchTimeoutError` class
99
<b>Signature:</b>
1010

1111
```typescript
12-
constructor(err: Error, mode: TimeoutErrorMode);
12+
constructor(err: Record<string, any>, mode: TimeoutErrorMode);
1313
```
1414

1515
## Parameters
1616

1717
| Parameter | Type | Description |
1818
| --- | --- | --- |
19-
| err | <code>Error</code> | |
19+
| err | <code>Record&lt;string, any&gt;</code> | |
2020
| mode | <code>TimeoutErrorMode</code> | |
2121

docs/setup/upgrade/upgrade-migrations.asciidoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ Saved objects are stored in two indices:
1919
* `.kibana_{kibana_version}_001`, or if the `kibana.index` configuration setting is set `.{kibana.index}_{kibana_version}_001`. E.g. for Kibana v7.12.0 `.kibana_7.12.0_001`.
2020
* `.kibana_task_manager_{kibana_version}_001`, or if the `xpack.tasks.index` configuration setting is set `.{xpack.tasks.index}_{kibana_version}_001` E.g. for Kibana v7.12.0 `.kibana_task_manager_7.12.0_001`.
2121

22-
The index aliases `.kibana` and `.kibana_task_manager` will always point to the most up-to-date version indices.
22+
The index aliases `.kibana` and `.kibana_task_manager` will always point to
23+
the most up-to-date saved object indices.
2324

2425
The first time a newer {kib} starts, it will first perform an upgrade migration before starting plugins or serving HTTP traffic. To prevent losing acknowledged writes old nodes should be shutdown before starting the upgrade. To reduce the likelihood of old nodes losing acknowledged writes, {kib} 7.12.0 and later will add a write block to the outdated index. Table 1 lists the saved objects indices used by previous versions of {kib}.
2526

2627
.Saved object indices and aliases per {kib} version
2728
[options="header"]
28-
[cols="a,a,a"]
2929
|=======================
30-
|Upgrading from version | Outdated index (alias) | Upgraded index (alias)
31-
| 6.0.0 through 6.4.x | `.kibana` 1.3+^.^| `.kibana_7.12.0_001`
32-
(`.kibana` alias)
30+
|Upgrading from version | Outdated index (alias)
31+
| 6.0.0 through 6.4.x | `.kibana`
3332

3433
`.kibana_task_manager_7.12.0_001` (`.kibana_task_manager` alias)
3534
| 6.5.0 through 7.3.x | `.kibana_N` (`.kibana` alias)

docs/user/alerting/alert-types.asciidoc

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This section covers stack alerts. For domain-specific alert types, refer to the
88
Users will need `all` access to the *Stack Alerts* feature to be able to create and edit any of the alerts listed below.
99
See <<kibana-feature-privileges, feature privileges>> for more information on configuring roles that provide access to this feature.
1010

11-
Currently {kib} provides one stack alert: the <<alert-type-index-threshold>> type.
11+
Currently {kib} provides two stack alerts: <<alert-type-index-threshold>> and <<alert-type-es-query>>.
1212

1313
[float]
1414
[[alert-type-index-threshold]]
@@ -112,6 +112,47 @@ You can interactively change the time window and observe the effect it has on th
112112
[role="screenshot"]
113113
image::images/alert-types-index-threshold-example-comparison.png[Comparing two time windows]
114114

115+
[float]
116+
[[alert-type-es-query]]
117+
=== ES query
118+
119+
The ES query alert type is designed to run a user-configured {es} query over indices, compare the number of matches to a configured threshold, and schedule
120+
actions to run when the threshold condition is met.
121+
122+
[float]
123+
==== Creating the alert
124+
125+
An ES query alert can be created from the *Create* button in the <<alert-management, alert management UI>>. Fill in the <<defining-alerts-general-details, general alert details>>, then select *ES query*.
126+
127+
[role="screenshot"]
128+
image::images/alert-types-es-query-select.png[Choosing an ES query alert type]
129+
130+
[float]
131+
==== Defining the conditions
115132

133+
The ES query alert has 4 clauses that define the condition to detect.
116134

135+
[role="screenshot"]
136+
image::images/alert-types-es-query-conditions.png[Four clauses define the condition to detect]
137+
138+
Index:: This clause requires an *index or index pattern* and a *time field* that will be used for the *time window*.
139+
ES query:: This clause specifies the ES DSL query to execute. The number of documents that match this query will be evaulated against the threshold
140+
condition. Aggregations are not supported at this time.
141+
Threshold:: This clause defines a threshold value and a comparison operator (`is above`, `is above or equals`, `is below`, `is below or equals`, or `is between`). The number of documents that match the specified query is compared to this threshold.
142+
Time window:: This clause determines how far back to search for documents, using the *time field* set in the *index* clause. Generally this value should be set to a value higher than the *check every* value in the <<defining-alerts-general-details, general alert details>>, to avoid gaps in detection.
143+
144+
[float]
145+
==== Testing your query
146+
147+
Use the *Test query* feature to verify that your query DSL is valid.
117148

149+
When your query is valid:: Valid queries will be executed against the configured *index* using the configured *time window*. The number of documents that
150+
match the query will be displayed.
151+
152+
[role="screenshot"]
153+
image::images/alert-types-es-query-valid.png[Test ES query returns number of matches when valid]
154+
155+
When your query is invalid:: An error message is shown if the query is invalid.
156+
157+
[role="screenshot"]
158+
image::images/alert-types-es-query-invalid.png[Test ES query shows error when invalid]
94.9 KB
Loading

0 commit comments

Comments
 (0)