mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Upgrade Assistant] Batch reindex docs (#112960)
* [UA] Added batch reindexing docs link to the ES deprecations page. Added a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency. * [Upgrade Assistant] Added docs build files * Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com> * Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com> * [Upgrade Assistant] Added review suggestions and fixed eslint issues Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
f911de0df0
commit
a85f7a5361
11 changed files with 80 additions and 21 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
experimental["The underlying Upgrade Assistant concepts are stable, but the APIs for managing Upgrade Assistant are experimental."]
|
||||
|
||||
Start or resume multiple reindexing tasks in one request. Additionally, reindexing tasks started or resumed
|
||||
Start or resume multiple <<start-resume-reindex, reindexing>> tasks in one request. Additionally, reindexing tasks started or resumed
|
||||
via the batch endpoint will be placed on a queue and executed one-by-one, which ensures that minimal cluster resources
|
||||
are consumed over time.
|
||||
|
||||
|
@ -76,7 +76,7 @@ Similar to the <<start-resume-reindex, start or resume endpoint>>, the API retur
|
|||
}
|
||||
--------------------------------------------------
|
||||
|
||||
<1> A list of reindex operations created, the order in the array indicates the order in which tasks will be executed.
|
||||
<1> A list of reindex tasks created, the order in the array indicates the order in which tasks will be executed.
|
||||
<2> Presence of this key indicates that the reindex job will occur in the batch.
|
||||
<3> A Unix timestamp of when the reindex task was placed in the queue.
|
||||
<4> A list of errors that may have occurred preventing the reindex task from being created.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<titleabbrev>Cancel reindex</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Cancel reindexes that are waiting for the {es} reindex task to complete. For example, `lastCompletedStep` set to `40`.
|
||||
experimental["The underlying Upgrade Assistant concepts are stable, but the APIs for managing Upgrade Assistant are experimental."]
|
||||
|
||||
Cancel reindexes that are waiting for the Elasticsearch reindex task to complete. For example, `lastCompletedStep` set to `40`.
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
<titleabbrev>Check reindex status</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Check the status of the reindex operation.
|
||||
experimental["The underlying Upgrade Assistant concepts are stable, but the APIs for managing Upgrade Assistant are experimental."]
|
||||
|
||||
Check the status of the reindex task.
|
||||
|
||||
[[check-reindex-status-request]]
|
||||
==== Request
|
||||
|
@ -43,7 +45,7 @@ The API returns the following:
|
|||
<2> Current status of the reindex. For details, see <<status-code,Status codes>>.
|
||||
<3> Last successfully completed step of the reindex. For details, see <<step-code,Step codes>> table.
|
||||
<4> Task ID of the reindex task in Elasticsearch. Only present if reindexing has started.
|
||||
<5> Percentage of how far the reindexing task in Elasticsearch has progressed, in decimal from from 0 to 1.
|
||||
<5> Percentage of how far the reindexing task in Elasticsearch has progressed, in decimal form from 0 to 1.
|
||||
<6> Error that caused the reindex to fail, if it failed.
|
||||
<7> An array of any warning codes explaining what changes are required for this reindex. For details, see <<warning-code,Warning codes>>.
|
||||
<8> Specifies if the user has sufficient privileges to reindex this index. When security is unavailable or disables, returns `true`.
|
||||
|
@ -73,7 +75,7 @@ To resume the reindex, you must submit a new POST request to the `/api/upgrade_a
|
|||
==== Step codes
|
||||
|
||||
`0`::
|
||||
The reindex operation has been created in Kibana.
|
||||
The reindex task has been created in Kibana.
|
||||
|
||||
`10`::
|
||||
The index group services stopped. Only applies to some system indices.
|
||||
|
|
|
@ -4,9 +4,18 @@
|
|||
<titleabbrev>Start or resume reindex</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Start a new reindex or resume a paused reindex.
|
||||
experimental["The underlying Upgrade Assistant concepts are stable, but the APIs for managing Upgrade Assistant are experimental."]
|
||||
|
||||
Start a new reindex or resume a paused reindex. Following steps are performed during
|
||||
a reindex task:
|
||||
|
||||
. Setting the index to read-only
|
||||
. Creating a new index
|
||||
. {ref}/docs-reindex.html[Reindexing] documents into the new index
|
||||
. Creating an index alias for the new index
|
||||
. Deleting the old index
|
||||
|
||||
|
||||
Start a new reindex or resume a paused reindex.
|
||||
|
||||
[[start-resume-reindex-request]]
|
||||
==== Request
|
||||
|
@ -40,6 +49,6 @@ The API returns the following:
|
|||
<1> The name of the new index.
|
||||
<2> The reindex status. For more information, refer to <<status-code,Status codes>>.
|
||||
<3> The last successfully completed step of the reindex. For more information, refer to <<step-code,Step codes>>.
|
||||
<4> The task ID of the reindex task in {es}. Appears when the reindexing starts.
|
||||
<5> The progress of the reindexing task in {es}. Appears in decimal form, from 0 to 1.
|
||||
<4> The task ID of the {ref}/docs-reindex.html[reindex] task in {es}. Appears when the reindexing starts.
|
||||
<5> The progress of the {ref}/docs-reindex.html[reindexing] task in {es}. Appears in decimal form, from 0 to 1.
|
||||
<6> The error that caused the reindex to fail, if it failed.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<titleabbrev>Upgrade readiness status</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Check the status of your cluster.
|
||||
experimental["The underlying Upgrade Assistant concepts are stable, but the APIs for managing Upgrade Assistant are experimental."]
|
||||
|
||||
Check the status of your cluster.
|
||||
|
||||
|
|
|
@ -132,7 +132,10 @@ readonly links: {
|
|||
};
|
||||
readonly addData: string;
|
||||
readonly kibana: string;
|
||||
readonly upgradeAssistant: string;
|
||||
readonly upgradeAssistant: {
|
||||
readonly overview: string;
|
||||
readonly batchReindex: string;
|
||||
};
|
||||
readonly rollupJobs: string;
|
||||
readonly elasticsearch: Record<string, string>;
|
||||
readonly siem: {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -153,7 +153,10 @@ export class DocLinksService {
|
|||
},
|
||||
addData: `${KIBANA_DOCS}connect-to-elasticsearch.html`,
|
||||
kibana: `${KIBANA_DOCS}index.html`,
|
||||
upgradeAssistant: `${KIBANA_DOCS}upgrade-assistant.html`,
|
||||
upgradeAssistant: {
|
||||
overview: `${KIBANA_DOCS}upgrade-assistant.html`,
|
||||
batchReindex: `${KIBANA_DOCS}batch-start-resume-reindex.html`,
|
||||
},
|
||||
rollupJobs: `${KIBANA_DOCS}data-rollups.html`,
|
||||
elasticsearch: {
|
||||
docsBase: `${ELASTICSEARCH_DOCS}`,
|
||||
|
@ -607,7 +610,10 @@ export interface DocLinksStart {
|
|||
};
|
||||
readonly addData: string;
|
||||
readonly kibana: string;
|
||||
readonly upgradeAssistant: string;
|
||||
readonly upgradeAssistant: {
|
||||
readonly overview: string;
|
||||
readonly batchReindex: string;
|
||||
};
|
||||
readonly rollupJobs: string;
|
||||
readonly elasticsearch: Record<string, string>;
|
||||
readonly siem: {
|
||||
|
|
|
@ -598,7 +598,10 @@ export interface DocLinksStart {
|
|||
};
|
||||
readonly addData: string;
|
||||
readonly kibana: string;
|
||||
readonly upgradeAssistant: string;
|
||||
readonly upgradeAssistant: {
|
||||
readonly overview: string;
|
||||
readonly batchReindex: string;
|
||||
};
|
||||
readonly rollupJobs: string;
|
||||
readonly elasticsearch: Record<string, string>;
|
||||
readonly siem: {
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
import React, { useEffect, useMemo } from 'react';
|
||||
import { withRouter, RouteComponentProps } from 'react-router-dom';
|
||||
|
||||
import { EuiPageHeader, EuiSpacer, EuiPageContent } from '@elastic/eui';
|
||||
import { EuiPageHeader, EuiSpacer, EuiPageContent, EuiLink } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { DocLinksStart } from 'kibana/public';
|
||||
import { METRIC_TYPE } from '@kbn/analytics';
|
||||
|
||||
import { EnrichedDeprecationInfo } from '../../../../common/types';
|
||||
|
@ -44,16 +46,42 @@ const i18nTexts = {
|
|||
}),
|
||||
pageDescription: i18n.translate('xpack.upgradeAssistant.esDeprecations.pageDescription', {
|
||||
defaultMessage:
|
||||
'You must resolve all critical issues before upgrading. Back up recommended. Make sure you have a current snapshot before modifying your configuration or reindexing.',
|
||||
'Resolve all critical issues before upgrading. Before making changes, ensure you have a current snapshot of your cluster. Some issues may require reindexing to resolve. ',
|
||||
}),
|
||||
isLoading: i18n.translate('xpack.upgradeAssistant.esDeprecations.loadingText', {
|
||||
defaultMessage: 'Loading deprecation issues…',
|
||||
}),
|
||||
};
|
||||
|
||||
const getBatchReindexLink = (docLinks: DocLinksStart) => {
|
||||
return (
|
||||
<FormattedMessage
|
||||
id="xpack.upgradeAssistant.esDeprecations.batchReindexingDocsDescription"
|
||||
defaultMessage="To start multiple reindexing tasks in a single request, use the Kibana {docsLink}."
|
||||
values={{
|
||||
docsLink: (
|
||||
<EuiLink
|
||||
href={docLinks.links.upgradeAssistant.batchReindex}
|
||||
target="_blank"
|
||||
external={true}
|
||||
>
|
||||
{i18n.translate('xpack.upgradeAssistant.esDeprecations.batchReindexingDocsLink', {
|
||||
defaultMessage: 'batch reindexing API',
|
||||
})}
|
||||
</EuiLink>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const EsDeprecations = withRouter(({ history }: RouteComponentProps) => {
|
||||
const {
|
||||
services: { api, breadcrumbs },
|
||||
services: {
|
||||
api,
|
||||
breadcrumbs,
|
||||
core: { docLinks },
|
||||
},
|
||||
} = useAppContext();
|
||||
|
||||
const { data: esDeprecations, isLoading, error, resendRequest } = api.useLoadEsDeprecations();
|
||||
|
@ -104,7 +132,15 @@ export const EsDeprecations = withRouter(({ history }: RouteComponentProps) => {
|
|||
|
||||
return (
|
||||
<div data-test-subj="esDeprecationsContent">
|
||||
<EuiPageHeader pageTitle={i18nTexts.pageTitle} description={i18nTexts.pageDescription}>
|
||||
<EuiPageHeader
|
||||
pageTitle={i18nTexts.pageTitle}
|
||||
description={
|
||||
<>
|
||||
{i18nTexts.pageDescription}
|
||||
{getBatchReindexLink(docLinks)}
|
||||
</>
|
||||
}
|
||||
>
|
||||
<DeprecationCount
|
||||
totalCriticalDeprecations={deprecationsCountByLevel.criticalDeprecations}
|
||||
totalWarningDeprecations={deprecationsCountByLevel.warningDeprecations}
|
||||
|
|
|
@ -75,7 +75,7 @@ export const Overview: FunctionComponent = () => {
|
|||
})}
|
||||
rightSideItems={[
|
||||
<EuiButtonEmpty
|
||||
href={docLinks.links.upgradeAssistant}
|
||||
href={docLinks.links.upgradeAssistant.overview}
|
||||
target="_blank"
|
||||
iconType="help"
|
||||
data-test-subj="documentationLink"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue