Skip to content

Commit

Permalink
Merge branch 'main' into fix/112229
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Nov 2, 2021
2 parents be32a08 + 6e14338 commit 7476e67
Show file tree
Hide file tree
Showing 420 changed files with 10,040 additions and 2,024 deletions.
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/fleet_cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- command: .buildkite/scripts/steps/functional/fleet_cypress.sh
label: 'Fleet Cypress Tests'
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 1
10 changes: 10 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ const uploadPipeline = (pipelineContent) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
}

if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/fleet/,
/^x-pack\/test\/fleet_cypress/,
])) ||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/fleet_cypress.yml'));
}

if (await doAnyChangesMatch([/^x-pack\/plugins\/uptime/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime.yml'));
}
Expand Down
20 changes: 20 additions & 0 deletions .buildkite/scripts/steps/functional/fleet_cypress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh

export JOB=kibana-fleet-cypress

echo "--- Fleet Cypress tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Fleet Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config test/fleet_cypress/cli_config.ts
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ report.asciidoc
/bazel
/bazel-*
.bazelrc.user

elastic-agent-*
fleet-server-*
elastic-agent.yml
fleet-server.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
[[index-patterns]]
=== Create an index pattern
[[data-views]]
=== Create a data view

{kib} requires an index pattern to access the {es} data that you want to explore.
An index pattern selects the data to use and allows you to define properties of the fields.
{kib} requires a data view to access the {es} data that you want to explore.
A data view selects the data to use and allows you to define properties of the fields.

An index pattern can point to one or more indices, {ref}/data-streams.html[data stream], or {ref}/alias.html[index aliases].
For example, an index pattern can point to your log data from yesterday,
A data view can point to one or more indices, {ref}/data-streams.html[data stream], or {ref}/alias.html[index aliases].
For example, a data view can point to your log data from yesterday,
or all indices that contain your data.

[float]
[[index-patterns-read-only-access]]
[[data-views-read-only-access]]
=== Required permissions

* Access to *Index Patterns* requires the <<xpack-kibana-role-management, {kib} privilege>>
`Index Pattern Management`.
* Access to *Data Views* requires the <<xpack-kibana-role-management, {kib} privilege>>
`Data View Management`.

* To create an index pattern, you must have the <<xpack-kibana-role-management,{es} privilege>>
* To create a data view, you must have the <<xpack-kibana-role-management,{es} privilege>>
`view_index_metadata`.

* If a read-only indicator appears in {kib}, you have insufficient privileges
to create or save index patterns. The buttons to create new index patterns or
save existing index patterns are not visible. For more information,
to create or save data views. The buttons to create new data views or
save existing data views are not visible. For more information,
refer to <<xpack-security-authorization,Granting access to {kib}>>.

[float]
[[settings-create-pattern]]
=== Create an index pattern
=== Create a data view

If you collected data using one of the {kib} <<connect-to-elasticsearch,ingest options>>,
uploaded a file, or added sample data,
you get an index pattern for free, and can start exploring your data.
If you loaded your own data, follow these steps to create an index pattern.
you get a data view for free, and can start exploring your data.
If you loaded your own data, follow these steps to create a data view.

. Open the main menu, then click to *Stack Management > Index Patterns*.
. Open the main menu, then click to *Stack Management > Data Views*.

. Click *Create data view*.

. Click *Create index pattern*.
+
[role="screenshot"]
image:management/index-patterns/images/create-index-pattern.png["Create index pattern"]
image:management/index-patterns/images/create-index-pattern.png["Create data view"]

. Start typing in the *Index pattern* field, and {kib} looks for the names of
. Start typing in the *name* field, and {kib} looks for the names of
indices, data streams, and aliases that match your input.
+
** To match multiple sources, use a wildcard (*). For example, `filebeat-*` matches
Expand All @@ -61,21 +61,21 @@ global time filters on your dashboards. This is useful if
you have multiple time fields and want to create dashboards that combine visualizations
based on different timestamps.

. Click *Create index pattern*.
. Click *Create data view*.
+
[[reload-fields]] {kib} is now configured to use your {es} data. When a new field is added to an index,
the index pattern field list is updated
the next time the index pattern is loaded, for example, when you load the page or
the data view field list is updated
the next time the data view is loaded, for example, when you load the page or
move between {kib} apps.

. Select this index pattern when you search and visualize your data.
. Select this data view when you search and visualize your data.

[float]
[[rollup-index-pattern]]
==== Create an index pattern for rolled up data
[[rollup-data-view]]
==== Create a data view for rolled up data

An index pattern can match one rollup index. For a combination rollup
index pattern with both raw and rolled up data, use the standard notation:
A data view can match one rollup index. For a combination rollup
data view with both raw and rolled up data, use the standard notation:

```ts
rollup_logstash,kibana_sample_data_logs
Expand All @@ -84,7 +84,7 @@ For an example, refer to <<rollup-data-tutorial,Create and visualize rolled up d

[float]
[[management-cross-cluster-search]]
==== Create an index pattern that searches across clusters
==== Create a data view that searches across clusters

If your {es} clusters are configured for {ref}/modules-cross-cluster-search.html[{ccs}],
you can create an index pattern to search across the clusters of your choosing. Use the
Expand Down Expand Up @@ -129,20 +129,20 @@ To exclude a cluster having a name starting with `cluster_`:
`cluster_*:logstash-*,cluster_one:-*`
```

Once you configure an index pattern to use the {ccs} syntax, all searches and
aggregations using that index pattern in {kib} take advantage of {ccs}.
Once you configure a data view to use the {ccs} syntax, all searches and
aggregations using that data view in {kib} take advantage of {ccs}.

[float]
[[delete-index-pattern]]
=== Delete index patterns
[[delete-data-view]]
=== Delete data views

When you delete an index pattern, you cannot recover the associated field formatters, runtime fields, source filters,
and field popularity data. Deleting an index pattern does not remove any indices or data documents from {es}.
When you delete a data view, you cannot recover the associated field formatters, runtime fields, source filters,
and field popularity data. Deleting a data view does not remove any indices or data documents from {es}.

WARNING: Deleting an index pattern breaks all visualizations, saved searches, and other saved objects that reference the index pattern.
WARNING: Deleting a data view breaks all visualizations, saved searches, and other saved objects that reference the data view.

. Open the main menu, then click *Stack Management > Index Patterns*.
. Open the main menu, then click *Stack Management > Data Views*.

. Click the index pattern to delete.
. Click the data view to delete.

. Delete (image:management/index-patterns/images/delete.png[Delete icon]) the index pattern.
. Delete (image:management/index-patterns/images/delete.png[Delete icon]) the data view.
16 changes: 8 additions & 8 deletions docs/concepts/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ Open the search bar using the keyboard shortcut Ctrl+/ on Windows and Linux, Com
image:concepts/images/global-search.png["Global search showing matches to apps and saved objects for the word visualize"]

[float]
=== Accessing data with index patterns
=== Accessing data with data views

{kib} requires an index pattern to tell it which {es} data you want to access,
and whether the data is time-based. An index pattern can point to one or more {es}
{kib} requires a data view to tell it which {es} data you want to access,
and whether the data is time-based. A data view can point to one or more {es}
data streams, indices, or index aliases by name.
For example, `logs-elasticsearch-prod-*` is an index pattern,
and it is time-based with a time field of `@timestamp`. The time field is not editable.

Index patterns are typically created by an administrator when sending data to {es}.
You can <<index-patterns,create or update index patterns>> in *Stack Management*, or by using a script
Data views are typically created by an administrator when sending data to {es}.
You can <<data-views,create or update data views>> in *Stack Management*, or by using a script
that accesses the {kib} API.

{kib} uses the index pattern to show you a list of fields, such as
{kib} uses the data view to show you a list of fields, such as
`event.duration`. You can customize the display name and format for each field.
For example, you can tell {kib} to display `event.duration` in seconds.
{kib} has <<managing-fields,field formatters>> for strings,
Expand Down Expand Up @@ -75,7 +75,7 @@ and can optionally contain the time filter and extra filters.
==== Time filter

The <<set-time-filter, global time filter>> limits the time range of data displayed.
In most cases, the time filter applies to the time field in the index pattern,
In most cases, the time filter applies to the time field in the data view,
but some apps allow you to use a different time field.

Using the time filter, you can configure a refresh rate to periodically
Expand Down Expand Up @@ -159,7 +159,7 @@ Use the global search to quickly open a saved object.
* Go to <<discover, Discover>> for instructions on searching your data.


include::index-patterns.asciidoc[]
include::data-views.asciidoc[]

include::set-time-filter.asciidoc[]

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/set-time-filter.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
=== Set the time range
Display data within a
specified time range when your index contains time-based events, and a time-field is configured for the
selected <<index-patterns, index pattern>>.
selected <<data-views, data view>>.
The default time range is 15 minutes, but you can customize
it in <<advanced-options,Advanced Settings>>.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<b>Signature:</b>

```typescript
export interface HttpResponse<TResponseBody = any>
export interface HttpResponse<TResponseBody = unknown>
```

## Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
readonly body?: any;
readonly body?: TResponseBody;
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<b>Signature:</b>

```typescript
export interface IHttpFetchError extends Error
export interface IHttpFetchError<TResponseBody = unknown> extends Error
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [body](./kibana-plugin-core-public.ihttpfetcherror.body.md) | <code>any</code> | |
| [body](./kibana-plugin-core-public.ihttpfetcherror.body.md) | <code>TResponseBody</code> | |
| [name](./kibana-plugin-core-public.ihttpfetcherror.name.md) | <code>string</code> | |
| [req](./kibana-plugin-core-public.ihttpfetcherror.req.md) | <code>Request</code> | |
| [request](./kibana-plugin-core-public.ihttpfetcherror.request.md) | <code>Request</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Properties that can be returned by HttpInterceptor.request to override the respo
<b>Signature:</b>

```typescript
export interface IHttpResponseInterceptorOverrides<TResponseBody = any>
export interface IHttpResponseInterceptorOverrides<TResponseBody = unknown>
```

## Properties
Expand Down
1 change: 1 addition & 0 deletions docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [Plugin](./kibana-plugin-core-public.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
| [PluginInitializerContext](./kibana-plugin-core-public.plugininitializercontext.md) | The available core services passed to a <code>PluginInitializer</code> |
| [ResolvedSimpleSavedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.md) | This interface is a very simple wrapper for SavedObjects resolved from the server with the [SavedObjectsClient](./kibana-plugin-core-public.savedobjectsclient.md)<!-- -->. |
| [ResponseErrorBody](./kibana-plugin-core-public.responseerrorbody.md) | |
| [SavedObject](./kibana-plugin-core-public.savedobject.md) | |
| [SavedObjectAttributes](./kibana-plugin-core-public.savedobjectattributes.md) | The data for a Saved Object is stored as an object in the <code>attributes</code> property. |
| [SavedObjectError](./kibana-plugin-core-public.savedobjecterror.md) | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ResponseErrorBody](./kibana-plugin-core-public.responseerrorbody.md) &gt; [attributes](./kibana-plugin-core-public.responseerrorbody.attributes.md)

## ResponseErrorBody.attributes property

<b>Signature:</b>

```typescript
attributes?: Record<string, unknown>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ResponseErrorBody](./kibana-plugin-core-public.responseerrorbody.md)

## ResponseErrorBody interface


<b>Signature:</b>

```typescript
export interface ResponseErrorBody
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [attributes](./kibana-plugin-core-public.responseerrorbody.attributes.md) | <code>Record&lt;string, unknown&gt;</code> | |
| [message](./kibana-plugin-core-public.responseerrorbody.message.md) | <code>string</code> | |
| [statusCode](./kibana-plugin-core-public.responseerrorbody.statuscode.md) | <code>number</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ResponseErrorBody](./kibana-plugin-core-public.responseerrorbody.md) &gt; [message](./kibana-plugin-core-public.responseerrorbody.message.md)

## ResponseErrorBody.message property

<b>Signature:</b>

```typescript
message: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ResponseErrorBody](./kibana-plugin-core-public.responseerrorbody.md) &gt; [statusCode](./kibana-plugin-core-public.responseerrorbody.statuscode.md)

## ResponseErrorBody.statusCode property

<b>Signature:</b>

```typescript
statusCode: number;
```
2 changes: 1 addition & 1 deletion docs/discover/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

You can search your data in any app that has a query bar, or by clicking on
elements in a visualization. A search matches indices in the current
<<index-patterns, index pattern>> and in the current <<set-time-filter,time frame>>.
<<data-views, data view>> and in the current <<set-time-filter,time frame>>.


[float]
Expand Down
2 changes: 1 addition & 1 deletion docs/maps/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To prevent the global search from applying to a layer, configure the following:
[[maps-narrow-layer-by-global-time]]
==== Narrow layers by global time

Layers that request data from {es} using an <<index-patterns, index pattern>> with a configured time field are narrowed by the <<set-time-filter, global time>>.
Layers that request data from {es} using a <<data-views, data view>> with a configured time field are narrowed by the <<set-time-filter, global time>>.
These layers contain the clock icon image:maps/images/clock_icon.png[clock icon] next to the layer name in the legend.

Use the time slider to quickly select time slices within the global time range:
Expand Down
5 changes: 5 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,8 @@ This content has moved. Refer to <<xpack-profiler>>.
== Rendering pre-captured profiler JSON

This content has moved. Refer to <<xpack-profiler>>.

[role="exclude",id="index-patterns"]
== Index patterns has been renamed to data views.

This content has moved. Refer to <<data-views>>.
2 changes: 1 addition & 1 deletion docs/setup/connect-to-elasticsearch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ You can manage your roles, privileges, and spaces in **{stack-manage-app}** in
If the {kib} ingest options don't work for you, you can index your
data into Elasticsearch with {ref}/getting-started-index.html[REST APIs]
or https://www.elastic.co/guide/en/elasticsearch/client/index.html[client libraries].
After you add your data, you're required to create an <<index-patterns,index pattern>> to tell
After you add your data, you're required to create a <<data-views,data view>> to tell
{kib} where to find the data.

* To add data for Elastic Observability, refer to {observability-guide}/add-observability-data.html[Send data to Elasticsearch].
Expand Down
Loading

0 comments on commit 7476e67

Please sign in to comment.