kibana/docs/api/upgrade-assistant/check_reindex_status.asciidoc
2020-12-17 13:59:56 -06:00

109 lines
2.9 KiB
Text

[[check-reindex-status]]
=== Check reindex status API
++++
<titleabbrev>Check reindex status</titleabbrev>
++++
experimental[] Check the status of the reindex operation.
[[check-reindex-status-request]]
==== Request
`GET <kibana host>:<port>/api/upgrade_assistant/reindex/myIndex`
[[check-reindex-status-response-codes]]
==== Response codes
`200`::
Indicates a successful call.
[[check-reindex-status-example]]
==== Example
The API returns the following:
[source,sh]
--------------------------------------------------
{
"reindexOp": {
"indexName": ".ml-state",
"newIndexName": ".reindexed-v7-ml-state", <1>
"status": 0, <2>
"lastCompletedStep": 40, <3>
"reindexTaskId": "QprwvTMzRQ2MLWOW22oQ4Q:11819", <4>
"reindexTaskPercComplete": 0.3, <5>
"errorMessage": null <6>
},
"warnings": [], <7>
"hasRequiredPrivileges": true <8>
}
--------------------------------------------------
<1> Name of the new index that is being created.
<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.
<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`.
[[status-code]]
==== Status codes
`0`::
In progress
`1`::
Completed
`2`::
Failed
`3`::
Paused
+
NOTE: If the {kib} node that started the reindex is shutdown or restarted, the reindex goes into a paused state after some time.
To resume the reindex, you must submit a new POST request to the `/api/upgrade_assistant/reindex/<indexName>` endpoint.
`4`::
Cancelled
[[step-code]]
==== Step codes
`0`::
The reindex operation has been created in Kibana.
`10`::
The index group services stopped. Only applies to some system indices.
`20`::
The index is set to `readonly`.
`30`::
The new destination index has been created.
`40`::
The reindex task in Elasticsearch has started.
`50`::
The reindex task in Elasticsearch has completed.
`60`::
Aliases were created to point to the new index, and the old index has been deleted.
`70`::
The index group services have resumed. Only applies to some system indices.
[[warning-code]]
==== Warning codes
`0`::
Specifies to remove the `_all` meta field.
`1`::
Specifies to convert any coerced boolean values in the source document. For example, `yes`, `1`, and `off`.
`2`::
Specifies to convert documents to support Elastic Common Schema. Only applies to APM indices created in 6.x.