2019-03-21 10:45:17 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats]]
|
2020-07-22 14:22:57 -04:00
|
|
|
= Get {transform} statistics API
|
2019-04-30 13:46:13 -04:00
|
|
|
|
|
|
|
[subs="attributes"]
|
2019-03-21 10:45:17 -04:00
|
|
|
++++
|
2019-09-16 11:28:19 -04:00
|
|
|
<titleabbrev>Get {transform} statistics</titleabbrev>
|
2019-03-21 10:45:17 -04:00
|
|
|
++++
|
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
Retrieves usage information for {transforms}.
|
2019-07-10 17:39:38 -04:00
|
|
|
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats-request]]
|
2020-07-22 14:22:57 -04:00
|
|
|
== {api-request-title}
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-10-08 02:59:01 -04:00
|
|
|
`GET _transform/<transform_id>/_stats`
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-10-08 02:59:01 -04:00
|
|
|
`GET _transform/<transform_id>,<transform_id>/_stats` +
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-10-08 02:59:01 -04:00
|
|
|
`GET _transform/_stats` +
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-10-08 02:59:01 -04:00
|
|
|
`GET _transform/_all/_stats` +
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-10-08 02:59:01 -04:00
|
|
|
`GET _transform/*/_stats` +
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-07-10 17:39:38 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats-prereqs]]
|
2020-07-22 14:22:57 -04:00
|
|
|
== {api-prereq-title}
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2020-04-06 11:06:22 -04:00
|
|
|
If the {es} {security-features} are enabled, you must have the following
|
|
|
|
privileges:
|
|
|
|
|
|
|
|
* `monitor_transform`
|
|
|
|
|
|
|
|
The built-in `transform_user` role has this privilege.
|
|
|
|
|
|
|
|
For more information, see <<security-privileges>> and <<built-in-roles>>.
|
2019-06-26 16:46:21 -04:00
|
|
|
|
2019-07-10 17:39:38 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats-desc]]
|
2020-07-22 14:22:57 -04:00
|
|
|
== {api-description-title}
|
2019-06-27 18:16:24 -04:00
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
You can get statistics for multiple {transforms} in a single API
|
2019-06-27 18:16:24 -04:00
|
|
|
request by using a comma-separated list of identifiers or a wildcard expression.
|
2019-09-16 11:28:19 -04:00
|
|
|
You can get statistics for all {transforms} by using `_all`, by
|
|
|
|
specifying `*` as the `<transform_id>`, or by omitting the
|
|
|
|
`<transform_id>`.
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-07-10 17:39:38 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats-path-parms]]
|
2020-07-22 14:22:57 -04:00
|
|
|
== {api-path-parms-title}
|
2019-06-26 16:46:21 -04:00
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
`<transform_id>`::
|
2019-12-17 12:01:31 -05:00
|
|
|
(Optional, string)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=transform-id-wildcard]
|
2019-06-26 16:46:21 -04:00
|
|
|
|
2019-07-10 17:39:38 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats-query-parms]]
|
2020-07-22 14:22:57 -04:00
|
|
|
== {api-query-parms-title}
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-07-10 17:39:38 -04:00
|
|
|
`allow_no_match`::
|
2019-12-17 12:01:31 -05:00
|
|
|
(Optional, boolean)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-match-transforms1]
|
2019-06-26 11:09:56 -04:00
|
|
|
|
2019-07-10 17:39:38 -04:00
|
|
|
`from`::
|
2019-12-17 12:01:31 -05:00
|
|
|
(Optional, integer)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=from-transforms]
|
2019-06-14 11:42:18 -04:00
|
|
|
|
2019-07-10 17:39:38 -04:00
|
|
|
`size`::
|
2019-12-17 12:01:31 -05:00
|
|
|
(Optional, integer)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=size-transforms]
|
2019-06-26 11:09:56 -04:00
|
|
|
|
2020-03-30 14:06:33 -04:00
|
|
|
[role="child_attributes"]
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats-response]]
|
2020-07-22 14:22:57 -04:00
|
|
|
== {api-response-body-title}
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2020-02-05 15:23:30 -05:00
|
|
|
The API returns an array of statistics objects for {transforms}, which are
|
|
|
|
sorted by the `id` value in ascending order. All of these properties are
|
|
|
|
informational; you cannot update their values.
|
|
|
|
|
2020-03-30 14:06:33 -04:00
|
|
|
//Begin checkpointing
|
2020-02-05 15:23:30 -05:00
|
|
|
`checkpointing`::
|
|
|
|
(object) Contains statistics about <<transform-checkpoints,checkpoints>>.
|
2020-03-30 14:06:33 -04:00
|
|
|
+
|
|
|
|
.Properties of `checkpointing`
|
|
|
|
[%collapsible%open]
|
|
|
|
====
|
|
|
|
`changes_last_detected_at`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(date)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=checkpointing-changes-last-detected-at]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
//Begin checkpointing.last
|
|
|
|
`last`:::
|
2020-02-05 15:23:30 -05:00
|
|
|
(object) Contains statistics about the last completed checkpoint.
|
2020-03-30 14:06:33 -04:00
|
|
|
+
|
|
|
|
.Properties of `last`
|
|
|
|
[%collapsible%open]
|
|
|
|
=====
|
|
|
|
`checkpoint`::::
|
2020-02-05 15:23:30 -05:00
|
|
|
(integer) The sequence number for the checkpoint.
|
2020-03-30 14:06:33 -04:00
|
|
|
`time_upper_bound_millis`::::
|
2020-02-05 15:23:30 -05:00
|
|
|
(date) When using time-based synchronization, this timestamp indicates the
|
|
|
|
upper bound of data that is included in the checkpoint.
|
2020-03-30 14:06:33 -04:00
|
|
|
`timestamp_millis`::::
|
2020-02-05 15:23:30 -05:00
|
|
|
(date) The timestamp of the checkpoint, which indicates when the checkpoint
|
|
|
|
was created.
|
2020-03-30 14:06:33 -04:00
|
|
|
=====
|
|
|
|
//End checkpointing.last
|
|
|
|
|
|
|
|
//Begin checkpointing.next
|
|
|
|
`next`:::
|
2020-02-05 15:23:30 -05:00
|
|
|
(object) Contains statistics about the next checkpoint that is currently in
|
|
|
|
progress. This object appears only when the {transform} `state` is `indexing`.
|
2020-03-30 14:06:33 -04:00
|
|
|
+
|
|
|
|
.Properties of `next`
|
|
|
|
[%collapsible%open]
|
|
|
|
=====
|
|
|
|
`checkpoint`::::
|
2020-02-05 15:23:30 -05:00
|
|
|
(integer) The sequence number for the checkpoint.
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`checkpoint_progress`::::
|
2020-02-05 15:23:30 -05:00
|
|
|
(object) Contains statistics about the progress of the checkpoint. For example,
|
|
|
|
it lists the `total_docs`, `docs_remaining`, `percent_complete`,
|
|
|
|
`docs_processed`, and `docs_indexed`. This information is available only for
|
|
|
|
batch {transforms} and the first checkpoint of {ctransforms}.
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`time_upper_bound_millis`::::
|
2020-02-05 15:23:30 -05:00
|
|
|
(date) When using time-based synchronization, this timestamp indicates the
|
|
|
|
upper bound of data that is included in the checkpoint.
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`timestamp_millis`::::
|
2020-02-05 15:23:30 -05:00
|
|
|
(date) The timestamp of the checkpoint, which indicates when the checkpoint was
|
|
|
|
created.
|
2020-03-30 14:06:33 -04:00
|
|
|
=====
|
|
|
|
//End checkpointing.next
|
|
|
|
|
|
|
|
`operations_behind`:::
|
2020-03-13 12:32:15 -04:00
|
|
|
(integer) The number of operations that have occurred on the source index but
|
|
|
|
have not been applied to the destination index yet. A high number can indicate
|
|
|
|
that the {transform} is failing to keep up.
|
2020-03-30 14:06:33 -04:00
|
|
|
====
|
|
|
|
//End checkpointing
|
2020-02-05 15:23:30 -05:00
|
|
|
|
|
|
|
`id`::
|
|
|
|
(string)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=transform-id]
|
2020-02-05 15:23:30 -05:00
|
|
|
|
2020-03-30 14:06:33 -04:00
|
|
|
//Begin node
|
2020-02-05 15:23:30 -05:00
|
|
|
`node`::
|
|
|
|
(object) For started {transforms} only, the node upon which the {transform} is
|
|
|
|
started.
|
2020-03-30 14:06:33 -04:00
|
|
|
+
|
|
|
|
.Properties of `node`
|
|
|
|
[%collapsible%open]
|
|
|
|
====
|
|
|
|
`attributes`:::
|
2020-02-05 15:23:30 -05:00
|
|
|
(object) A list of attributes for the node.
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`ephemeral_id`:::
|
2020-02-05 15:23:30 -05:00
|
|
|
(string) The node ephemeral ID.
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`id`:::
|
2020-02-05 15:23:30 -05:00
|
|
|
(string) The unique identifier of the node. For example, "0-o0tOoRTwKFZifatTWKNw".
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`name`:::
|
2020-02-05 15:23:30 -05:00
|
|
|
(string) The node name. For example, `0-o0tOo`.
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`transport_address`:::
|
2020-02-05 15:23:30 -05:00
|
|
|
(string) The host and port where transport HTTP connections are accepted. For
|
|
|
|
example, `127.0.0.1:9300`.
|
2020-03-30 14:06:33 -04:00
|
|
|
====
|
|
|
|
//End node
|
|
|
|
|
2020-03-26 10:56:46 -04:00
|
|
|
`reason`::
|
|
|
|
(string)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=state-transform-reason]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
2020-02-05 15:23:30 -05:00
|
|
|
`state`::
|
2020-03-26 10:56:46 -04:00
|
|
|
(string)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=state-transform]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
//Begin stats
|
2020-02-05 15:23:30 -05:00
|
|
|
`stats`::
|
|
|
|
(object) An object that provides statistical information about the {transform}.
|
2020-03-30 14:06:33 -04:00
|
|
|
+
|
|
|
|
.Properties of `stats`
|
|
|
|
[%collapsible%open]
|
|
|
|
====
|
|
|
|
|
|
|
|
`documents_indexed`:::
|
2020-03-30 08:57:02 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=docs-indexed]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`documents_processed`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=docs-processed]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`exponential_avg_checkpoint_duration_ms`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(double)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=exponential-avg-checkpoint-duration-ms]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`exponential_avg_documents_indexed`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(double)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=exponential-avg-documents-indexed]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`exponential_avg_documents_processed`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(double)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=exponential-avg-documents-processed]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`index_failures`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-failures]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`index_time_in_ms`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-time-ms]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`index_total`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-total]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`pages_processed`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pages-processed]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
2020-04-02 19:12:57 -04:00
|
|
|
`processing_time_in_ms`:::
|
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=processing-time-ms]
|
2020-04-02 19:12:57 -04:00
|
|
|
|
|
|
|
`processing_total`:::
|
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=processing-total]
|
2020-04-02 19:12:57 -04:00
|
|
|
|
2020-03-30 14:06:33 -04:00
|
|
|
`search_failures`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=search-failures]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`search_time_in_ms`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=search-time-ms]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`search_total`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=search-total]
|
2020-03-30 14:06:33 -04:00
|
|
|
|
|
|
|
`trigger_count`:::
|
2020-03-26 10:56:46 -04:00
|
|
|
(long)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=trigger-count]
|
2020-03-30 14:06:33 -04:00
|
|
|
====
|
|
|
|
//End stats
|
2019-06-27 18:16:24 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats-response-codes]]
|
2020-07-22 14:22:57 -04:00
|
|
|
== {api-response-codes-title}
|
2019-06-27 18:16:24 -04:00
|
|
|
|
|
|
|
`404` (Missing resources)::
|
|
|
|
If `allow_no_match` is `false`, this code indicates that there are no
|
|
|
|
resources that match the request or only partial matches for the request.
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[get-transform-stats-example]]
|
2020-07-22 14:22:57 -04:00
|
|
|
== Examples
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
The following example skips for the first five {transforms} and
|
2019-06-14 11:42:18 -04:00
|
|
|
gets usage information for a maximum of ten results:
|
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2019-06-14 11:42:18 -04:00
|
|
|
--------------------------------------------------
|
2019-10-08 02:59:01 -04:00
|
|
|
GET _transform/_stats?from=5&size=10
|
2019-06-14 11:42:18 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2020-04-02 19:12:57 -04:00
|
|
|
The following example gets usage information for the {transform}:
|
2019-03-21 10:45:17 -04:00
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2019-03-21 10:45:17 -04:00
|
|
|
--------------------------------------------------
|
2020-04-02 19:12:57 -04:00
|
|
|
GET _transform/ecommerce-customer-transform/_stats
|
2019-03-21 10:45:17 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
|
|
|
The API returns the following results:
|
2019-09-06 09:22:08 -04:00
|
|
|
|
|
|
|
[source,console-result]
|
2019-03-21 10:45:17 -04:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"count" : 1,
|
|
|
|
"transforms" : [
|
|
|
|
{
|
2020-04-02 19:12:57 -04:00
|
|
|
"id" : "ecommerce-customer-transform",
|
|
|
|
"state" : "started",
|
|
|
|
"node" : {
|
|
|
|
"id" : "cpTIGMsVQ8Gqwqlxxxxxxx",
|
|
|
|
"name" : "my.home",
|
|
|
|
"ephemeral_id" : "5-L21nFsQxxxxxxxxxx-xx",
|
|
|
|
"transport_address" : "127.0.0.1:9300",
|
|
|
|
"attributes" : { }
|
|
|
|
},
|
2019-03-21 10:45:17 -04:00
|
|
|
"stats" : {
|
2020-04-02 19:12:57 -04:00
|
|
|
"pages_processed" : 78,
|
|
|
|
"documents_processed" : 6027,
|
|
|
|
"documents_indexed" : 68,
|
|
|
|
"trigger_count" : 168,
|
|
|
|
"index_time_in_ms" : 412,
|
|
|
|
"index_total" : 20,
|
2019-03-21 10:45:17 -04:00
|
|
|
"index_failures" : 0,
|
2020-04-02 19:12:57 -04:00
|
|
|
"search_time_in_ms" : 353,
|
|
|
|
"search_total" : 78,
|
2019-08-14 14:08:27 -04:00
|
|
|
"search_failures" : 0,
|
2020-04-02 19:12:57 -04:00
|
|
|
"processing_time_in_ms" : 8,
|
|
|
|
"processing_total" : 78,
|
|
|
|
"exponential_avg_checkpoint_duration_ms" : 97.30637923893185,
|
|
|
|
"exponential_avg_documents_indexed" : 2.2064915040974062,
|
|
|
|
"exponential_avg_documents_processed" : 179.89419945785045
|
2019-05-16 10:10:23 -04:00
|
|
|
},
|
|
|
|
"checkpointing" : {
|
2019-07-23 13:00:50 -04:00
|
|
|
"last" : {
|
2020-04-02 19:12:57 -04:00
|
|
|
"checkpoint" : 20,
|
|
|
|
"timestamp_millis" : 1585344558220,
|
|
|
|
"time_upper_bound_millis" : 1585344498220
|
2019-05-16 10:10:23 -04:00
|
|
|
},
|
2020-04-02 19:12:57 -04:00
|
|
|
"changes_last_detected_at" : 1585344558219
|
2019-03-21 10:45:17 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
----
|