Skip to content

Commit

Permalink
Merge branch 'main' into revert-124310
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Feb 5, 2022
2 parents 0c67fd6 + 35d3c9a commit 0de7783
Show file tree
Hide file tree
Showing 102 changed files with 1,661 additions and 512 deletions.
7 changes: 5 additions & 2 deletions docs/management/upgrade-assistant/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ enables you to see if you are using deprecated features,
and guides you through the process of resolving issues.

If you have indices that were created prior to 7.0,
you can use the assistant to reindex them so they can be accessed from 8.0.
you can use the assistant to reindex them so they can be accessed from 8.0+.

IMPORTANT: To see the most up-to-date deprecation information before
upgrading to 8.0, upgrade to the latest 7.n release.
upgrading to 8.0, upgrade to the latest {prev-major-last} release.

For more information about upgrading,
refer to {stack-ref}/upgrading-elastic-stack.html[Upgrading to Elastic {version}.]

[discrete]
=== Required permissions
Expand Down
10 changes: 10 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,13 @@ This content has moved. Refer to <<managing-data-views>>.
== Kibana role management.

This content has moved. Refer to <<kibana-role-management>>.

[role="exclude" logging-configuration-changes]
== Logging configuration changes

This content has moved. Refer to <<logging-config-changes>>.

[role="exclude" upgrade-migrations]
== Upgrade migrations

This content has moved. Refer to <<saved-object-migrations>>.
118 changes: 19 additions & 99 deletions docs/setup/upgrade.asciidoc
Original file line number Diff line number Diff line change
@@ -1,114 +1,34 @@
[[upgrade]]
== Upgrade {kib}

You can always upgrade to the latest patch release or from one minor version
to another within the same major version series.
To upgrade from 7.16 or earlier to {version},
**You must first upgrade to {prev-major-last}**.
This enables you to use the Upgrade Assistant to
{stack-ref}/upgrading-elastic-stack.html#prepare-to-upgrade[prepare to upgrade].
You must resolve all critical issues identified by the Upgrade Assistant
before proceeding with the upgrade.

For major version upgrades:

. Upgrade to the last minor version released before the new major version.
. Use the Upgrade Assistant to determine what changes you need to make before the major version upgrade.
. When you've addressed all the critical issues, upgrade {es} and then upgrade {kib}.

IMPORTANT: You can upgrade to pre-release versions of 8.0 for testing,
but upgrading from a pre-release to the final GA version is not supported.
Pre-releases should only be used for testing in a temporary environment.

[discrete]
[[upgrade-paths]]
=== Recommended upgrade paths to 8.0

[cols="<1,3",options="header",]
|====
|Upgrading from
|Upgrade path

|7.16
|Upgrade to 8.0

|6.8–7.15
a|

. Upgrade to 7.16
. Upgrade to 8.0

|6.0–6.7
a|

. Upgrade to 6.8
. Upgrade to 7.16
. Upgrade to 8.0
|====

[float]
[[upgrade-before-you-begin]]
=== Before you begin
{kib} does not support rolling upgrades.
You must shut down all {kib} instances, install the new software, and restart {kib}.
Upgrading while older {kib} instances are running can cause data loss or upgrade failures.

[WARNING]
====
{kib} automatically runs upgrade migrations when required. To roll back to an
earlier version in case of an upgrade failure, you **must** have a
{kib} automatically runs <<saved-object-migrations, saved object migrations>>
when required.
In case of an upgrade failure, you can roll back to an
earlier version of {kib}. To roll back, you **must** have a
{ref}/snapshot-restore.html[backup snapshot] that includes the `kibana` feature
state. Snapshots include this feature state by default.
For more information, refer to <<upgrade-migrations, upgrade migrations>>.
====

Before you upgrade {kib}:
For more information about upgrading,
refer to {stack-ref}/upgrading-elastic-stack.html[Upgrading to Elastic {version}.]

* Consult the <<breaking-changes,breaking changes>>.
* {ref}/snapshots-take-snapshot.html[Take a snapshot] of your data. To roll back to an earlier version, the snapshot must include the `kibana` feature state.
* Before you upgrade production servers, test the upgrades in a dev environment.
* See <<preventing-migration-failures, preventing migration failures>> for common reasons upgrades fail and how to prevent these.
* If you are using custom plugins, check that a compatible version is
available.
* Shut down all {kib} instances. Running more than one {kib} version against
the same Elasticseach index is unsupported. Upgrading while older {kib}
instances are running can cause data loss or upgrade failures.

NOTE: {kib} logging system may have changed, depending on your target version. For details, see <<logging-configuration, Configure logging>>.

To identify the changes you need to make to upgrade, and to enable you to
perform an Elasticsearch rolling upgrade with no downtime, you must upgrade to
6.7 before you upgrade to 7.0.

For a comprehensive overview of the upgrade process, refer to
*{stack-ref}/upgrading-elastic-stack.html[Upgrading the Elastic Stack]*.

[float]
[[upgrade-5x-earlier]]
=== Upgrade from 5.x or earlier
{es} can read indices created in the previous major version. Before you upgrade
to 7.0.0, you must reindex or delete any indices created in 5.x or earlier.
For more information, refer to
{stack-ref}/upgrading-elastic-stack.html[Upgrading the Elastic Stack].

When your reindex is complete, follow the <<upgrade-standard, Standard upgrade>>
instructions.

[float]
[[upgrade-6x]]
=== Upgrade from 6.x

The recommended path is to upgrade to 6.8 before upgrading to 7.0. This makes it
easier to identify the required changes, and enables you to use the Upgrade
Assistant to prepare for your upgrade to 7.0.

TIP: The ability to import {kib} 6.x saved searches, visualizations, and
dashboards is supported.

[float]
[[upgrade-67]]
=== Upgrade from 6.8
To help you prepare for your upgrade to 7.0, 6.8 includes an https://www.elastic.co/guide/en/kibana/6.8/upgrade-assistant.html[Upgrade Assistant]
To access the assistant, go to *Management > 7.0 Upgrade Assistant*.

After you have addressed any issues that were identified by the Upgrade
Assistant, <<upgrade-standard,upgrade to 7.0>>.


include::upgrade/upgrade-standard.asciidoc[]
IMPORTANT: You can upgrade to pre-release versions for testing,
but upgrading from a pre-release to the General Available version is not supported.
Pre-releases should only be used for testing in a temporary environment.

include::upgrade/upgrade-migrations.asciidoc[]
include::upgrade/upgrade-migrations.asciidoc[leveloffset=-1]

include::upgrade/logging-configuration-changes.asciidoc[]
3 changes: 2 additions & 1 deletion docs/setup/upgrade/logging-configuration-changes.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[[logging-configuration-changes]]
[discrete]
[[logging-config-changes]]
=== Logging configuration changes

WARNING: {kib} 8.0 and later uses a new logging system. Be sure to read the documentation for your version of {kib} before proceeding.
Expand Down
5 changes: 3 additions & 2 deletions docs/setup/upgrade/upgrade-migrations.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[[upgrade-migrations]]
=== Upgrade migrations
[float]
[[saved-object-migrations]]
=== Saved object migrations

Every time {kib} is upgraded it will perform an upgrade migration to ensure that all <<managing-saved-objects,saved objects>> are compatible with the new version.

Expand Down
2 changes: 1 addition & 1 deletion docs/user/security/audit-logging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ When "thom" logs in, a "user_login" {kib} audit event is written:

[source,json]
-------------
{"event":{"action":"user_login","category":["authentication"],"outcome":"success"},"user":{"name":"thom","roles":["superuser"]},"@timestamp":"2022-01-25T09:40:39.267-05:00","message":"User [thom] has logged in using basic provider [name=basic]","trace":{"id":"818cbf3..."}}
{"event":{"action":"user_login","category":["authentication"],"outcome":"success"},"kibana":{"session_id":"ab93zdA..."},"user":{"name":"thom","roles":["superuser"]},"@timestamp":"2022-01-25T09:40:39.267-05:00","message":"User [thom] has logged in using basic provider [name=basic]","trace":{"id":"818cbf3..."}}
-------------

The `trace.id` value `"818cbf3..."` in the {kib} audit event can be correlated with the `opaque_id` value in these six {es} audit events:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
"@dnd-kit/core": "^3.1.1",
"@dnd-kit/sortable": "^4.0.0",
"@dnd-kit/utilities": "^2.0.0",
"@elastic/apm-rum": "^5.10.1",
"@elastic/apm-rum-react": "^1.3.3",
"@elastic/apm-rum": "^5.10.2",
"@elastic/apm-rum-react": "^1.3.4",
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/charts": "43.1.1",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
},
discover: {
guide: `${KIBANA_DOCS}discover.html`,
fieldStatistics: `${KIBANA_DOCS}show-field-statistics.html`,
},
filebeat: {
base: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}`,
Expand Down Expand Up @@ -234,6 +235,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
asyncSearch: `${ELASTICSEARCH_DOCS}async-search-intro.html`,
dataStreams: `${ELASTICSEARCH_DOCS}data-streams.html`,
deprecationLogging: `${ELASTICSEARCH_DOCS}logging.html#deprecation-logging`,
frozenIndices: `${ELASTICSEARCH_DOCS}frozen-indices.html`,
hiddenIndices: `${ELASTICSEARCH_DOCS}multi-index.html#hidden`,
ilm: `${ELASTICSEARCH_DOCS}index-lifecycle-management.html`,
ilmForceMerge: `${ELASTICSEARCH_DOCS}ilm-forcemerge.html`,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class DataServerPlugin
this.autocompleteService.setup(core);
this.kqlTelemetryService.setup(core, { usageCollection });

core.uiSettings.register(getUiSettings());
core.uiSettings.register(getUiSettings(core.docLinks));

const searchSetup = this.searchService.setup(core, {
bfetch,
Expand Down
22 changes: 12 additions & 10 deletions src/plugins/data/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { i18n } from '@kbn/i18n';
import { schema } from '@kbn/config-schema';
import { UiSettingsParams } from 'kibana/server';
import type { DocLinksServiceSetup, UiSettingsParams } from 'kibana/server';
import { DEFAULT_QUERY_LANGUAGE, UI_SETTINGS } from '../common';

const luceneQueryLanguageLabel = i18n.translate('data.advancedSettings.searchQueryLanguageLucene', {
Expand All @@ -31,7 +31,9 @@ const requestPreferenceOptionLabels = {
}),
};

export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
export function getUiSettings(
docLinks: DocLinksServiceSetup
): Record<string, UiSettingsParams<unknown>> {
return {
[UI_SETTINGS.META_FIELDS]: {
name: i18n.translate('data.advancedSettings.metaFieldsTitle', {
Expand Down Expand Up @@ -71,7 +73,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'data.advancedSettings.query.queryStringOptionsText',
values: {
optionsLink:
'<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html" target="_blank" rel="noopener">' +
`<a href=${docLinks.links.query.luceneQuery} target="_blank" rel="noopener">` +
i18n.translate('data.advancedSettings.query.queryStringOptions.optionsLinkText', {
defaultMessage: 'Options',
}) +
Expand Down Expand Up @@ -150,7 +152,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'data.advancedSettings.sortOptionsText',
values: {
optionsLink:
'<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html" target="_blank" rel="noopener">' +
`<a href=${docLinks?.links.elasticsearch.sortSearch} target="_blank" rel="noopener">` +
i18n.translate('data.advancedSettings.sortOptions.optionsLinkText', {
defaultMessage: 'Options',
}) +
Expand Down Expand Up @@ -232,7 +234,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
setRequestReferenceSetting: `<strong>${UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE}</strong>`,
customSettingValue: '"custom"',
requestPreferenceLink:
'<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html" target="_blank" rel="noopener">' +
`<a href=${docLinks.links.apis.searchPreference} target="_blank" rel="noopener">` +
i18n.translate(
'data.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText',
{
Expand All @@ -256,7 +258,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'Controls the {maxRequestsLink} setting used for _msearch requests sent by Kibana. ' +
'Set to 0 to disable this config and use the Elasticsearch default.',
values: {
maxRequestsLink: `<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html"
maxRequestsLink: `<a href=${docLinks.links.apis.multiSearch}
target="_blank" rel="noopener" >max_concurrent_shard_requests</a>`,
},
}),
Expand All @@ -265,7 +267,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
},
[UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: {
name: 'Search in frozen indices',
description: `Will include <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen-indices.html"
description: `Will include <a href=${docLinks.links.elasticsearch.frozenIndices}
target="_blank" rel="noopener">frozen indices</a> in results if enabled. Searching through frozen indices
might increase the search time.`,
value: false,
Expand Down Expand Up @@ -444,7 +446,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'data.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText',
values: {
acceptedFormatsLink:
`<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#date-math"
`<a href=${docLinks.links.date.dateMath}
target="_blank" rel="noopener">` +
i18n.translate('data.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText', {
defaultMessage: 'accepted formats',
Expand Down Expand Up @@ -495,7 +497,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'Elasticsearch terms aggregation. {learnMoreLink}',
values: {
learnMoreLink:
'<a href="https://www.elastic.co/guide/en/kibana/current/kibana-concepts-analysts.html#autocomplete-suggestions" target="_blank" rel="noopener">' +
`<a href=${docLinks.links.kibana.autocompleteSuggestions} target="_blank" rel="noopener">` +
i18n.translate('data.advancedSettings.autocompleteValueSuggestionMethodLink', {
defaultMessage: 'Learn more.',
}) +
Expand All @@ -517,7 +519,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'Disable this property to get autocomplete suggestions from your full dataset, rather than from the current time range. {learnMoreLink}',
values: {
learnMoreLink:
'<a href="https://www.elastic.co/guide/en/kibana/current/kibana-concepts-analysts.html#autocomplete-suggestions" target="_blank" rel="noopener">' +
`<a href=${docLinks.links.kibana.autocompleteSuggestions} target="_blank" rel="noopener">` +
i18n.translate('data.advancedSettings.autocompleteValueSuggestionMethodLearnMoreLink', {
defaultMessage: 'Learn more.',
}) +
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/discover/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { searchSavedObjectType } from './saved_objects';
export class DiscoverServerPlugin implements Plugin<object, object> {
public setup(core: CoreSetup) {
core.capabilities.registerProvider(capabilitiesProvider);
core.uiSettings.register(getUiSettings());
core.uiSettings.register(getUiSettings(core.docLinks));
core.savedObjects.registerType(searchSavedObjectType);

return {};
Expand Down
10 changes: 6 additions & 4 deletions src/plugins/discover/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { i18n } from '@kbn/i18n';
import { schema } from '@kbn/config-schema';

import { UiSettingsParams } from 'kibana/server';
import type { DocLinksServiceSetup, UiSettingsParams } from 'kibana/server';
import { METRIC_TYPE } from '@kbn/analytics';
import {
DEFAULT_COLUMNS_SETTING,
Expand All @@ -31,7 +31,9 @@ import {
ROW_HEIGHT_OPTION,
} from '../common';

export const getUiSettings: () => Record<string, UiSettingsParams> = () => ({
export const getUiSettings: (docLinks: DocLinksServiceSetup) => Record<string, UiSettingsParams> = (
docLinks: DocLinksServiceSetup
) => ({
[DEFAULT_COLUMNS_SETTING]: {
name: i18n.translate('discover.advancedSettings.defaultColumnsTitle', {
defaultMessage: 'Default columns',
Expand Down Expand Up @@ -215,7 +217,7 @@ export const getUiSettings: () => Record<string, UiSettingsParams> = () => ({
defaultMessage: `Enable the {fieldStatisticsDocs} to show details such as the minimum and maximum values of a numeric field or a map of a geo field. This functionality is in beta and is subject to change.`,
values: {
fieldStatisticsDocs:
`<a href="https://www.elastic.co/guide/en/kibana/current/show-field-statistics.html"
`<a href=${docLinks.links.discover.fieldStatistics}
target="_blank" rel="noopener">` +
i18n.translate('discover.advancedSettings.discover.fieldStatisticsLinkText', {
defaultMessage: 'Field statistics view',
Expand All @@ -240,7 +242,7 @@ export const getUiSettings: () => Record<string, UiSettingsParams> = () => ({
defaultMessage: `Controls whether {multiFields} display in the expanded document view. In most cases, multi-fields are the same as the original field. This option is only available when \`searchFieldsFromSource\` is off.`,
values: {
multiFields:
`<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html"
`<a href=${docLinks.links.elasticsearch.mappingMultifields}
target="_blank" rel="noopener">` +
i18n.translate('discover.advancedSettings.discover.multiFieldsLinkText', {
defaultMessage: 'multi-fields',
Expand Down
5 changes: 5 additions & 0 deletions x-pack/examples/third_party_vis_lens_example/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"@typescript-eslint/consistent-type-definitions": 0
}
}
Loading

0 comments on commit 0de7783

Please sign in to comment.