jobcounts.asciidoc 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-jobstats]]
  4. === Job Statistics
  5. The get job statistics API provides information about the operational
  6. progress of a job.
  7. `assignment_explanation`::
  8. (string) For open jobs only, contains messages relating to the selection
  9. of a node to run the job.
  10. `data_counts`::
  11. (object) An object that describes the number of records processed and
  12. any related error counts. See <<ml-datacounts,data counts objects>>.
  13. `job_id`::
  14. (string) A unique identifier for the job.
  15. `model_size_stats`::
  16. (object) An object that provides information about the size and contents of the model.
  17. See <<ml-modelsizestats,model size stats objects>>
  18. `forecasts_stats`::
  19. (object) An object that provides statistical information about forecasts
  20. of this job. See <<ml-forecastsstats, forecasts stats objects>>
  21. `node`::
  22. (object) For open jobs only, contains information about the node where the
  23. job runs. See <<ml-stats-node,node object>>.
  24. `open_time`::
  25. (string) For open jobs only, the elapsed time for which the job has been open.
  26. For example, `28746386s`.
  27. `state`::
  28. (string) The status of the job, which can be one of the following values:
  29. `opened`::: The job is available to receive and process data.
  30. `closed`::: The job finished successfully with its model state persisted.
  31. The job must be opened before it can accept further data.
  32. `closing`::: The job close action is in progress and has not yet completed.
  33. A closing job cannot accept further data.
  34. `failed`::: The job did not finish successfully due to an error.
  35. This situation can occur due to invalid input data.
  36. If the job had irrevocably failed, it must be force closed and then deleted.
  37. If the {dfeed} can be corrected, the job can be closed and then re-opened.
  38. `opening`::: The job open action is in progress and has not yet completed.
  39. [float]
  40. [[ml-datacounts]]
  41. ==== Data Counts Objects
  42. The `data_counts` object describes the number of records processed
  43. and any related error counts.
  44. The `data_count` values are cumulative for the lifetime of a job. If a model snapshot is reverted
  45. or old results are deleted, the job counts are not reset.
  46. `bucket_count`::
  47. (long) The number of bucket results produced by the job.
  48. `earliest_record_timestamp`::
  49. (string) The timestamp of the earliest chronologically ordered record.
  50. The datetime string is in ISO 8601 format.
  51. `empty_bucket_count`::
  52. (long) The number of buckets which did not contain any data. If your data contains many
  53. empty buckets, consider increasing your `bucket_span` or using functions that are tolerant
  54. to gaps in data such as `mean`, `non_null_sum` or `non_zero_count`.
  55. `input_bytes`::
  56. (long) The number of raw bytes read by the job.
  57. `input_field_count`::
  58. (long) The total number of record fields read by the job. This count includes
  59. fields that are not used in the analysis.
  60. `input_record_count`::
  61. (long) The number of data records read by the job.
  62. `invalid_date_count`::
  63. (long) The number of records with either a missing date field or a date that could not be parsed.
  64. `job_id`::
  65. (string) A unique identifier for the job.
  66. `last_data_time`::
  67. (datetime) The timestamp at which data was last analyzed, according to server time.
  68. `latest_empty_bucket_timestamp`::
  69. (date) The timestamp of the last bucket that did not contain any data.
  70. `latest_record_timestamp`::
  71. (date) The timestamp of the last processed record.
  72. `latest_sparse_bucket_timestamp`::
  73. (date) The timestamp of the last bucket that was considered sparse.
  74. `missing_field_count`::
  75. (long) The number of records that are missing a field that the job is
  76. configured to analyze. Records with missing fields are still processed because
  77. it is possible that not all fields are missing. The value of
  78. `processed_record_count` includes this count. +
  79. NOTE: If you are using {dfeeds} or posting data to the job in JSON format, a
  80. high `missing_field_count` is often not an indication of data issues. It is not
  81. necessarily a cause for concern.
  82. `out_of_order_timestamp_count`::
  83. (long) The number of records that are out of time sequence and
  84. outside of the latency window. This information is applicable only when
  85. you provide data to the job by using the <<ml-post-data,post data API>>.
  86. These out of order records are discarded, since jobs require time series data
  87. to be in ascending chronological order.
  88. `processed_field_count`::
  89. (long) The total number of fields in all the records that have been processed
  90. by the job. Only fields that are specified in the detector configuration
  91. object contribute to this count. The time stamp is not included in this count.
  92. `processed_record_count`::
  93. (long) The number of records that have been processed by the job.
  94. This value includes records with missing fields, since they are nonetheless
  95. analyzed. +
  96. If you use {dfeeds} and have aggregations in your search query,
  97. the `processed_record_count` will be the number of aggregated records
  98. processed, not the number of {es} documents.
  99. `sparse_bucket_count`::
  100. (long) The number of buckets that contained few data points compared to the
  101. expected number of data points. If your data contains many sparse buckets,
  102. consider using a longer `bucket_span`.
  103. [float]
  104. [[ml-modelsizestats]]
  105. ==== Model Size Stats Objects
  106. The `model_size_stats` object has the following properties:
  107. `bucket_allocation_failures_count`::
  108. (long) The number of buckets for which new entities in incoming data were not
  109. processed due to insufficient model memory. This situation is also signified
  110. by a `hard_limit: memory_status` property value.
  111. `job_id`::
  112. (string) A numerical character string that uniquely identifies the job.
  113. `log_time`::
  114. (date) The timestamp of the `model_size_stats` according to server time.
  115. `memory_status`::
  116. (string) The status of the mathematical models.
  117. This property can have one of the following values:
  118. `ok`::: The models stayed below the configured value.
  119. `soft_limit`::: The models used more than 60% of the configured memory limit
  120. and older unused models will be pruned to free up space.
  121. `hard_limit`::: The models used more space than the configured memory limit.
  122. As a result, not all incoming data was processed.
  123. `model_bytes`::
  124. (long) The number of bytes of memory used by the models. This is the maximum
  125. value since the last time the model was persisted. If the job is closed,
  126. this value indicates the latest size.
  127. `result_type`::
  128. (string) For internal use. The type of result.
  129. `total_by_field_count`::
  130. (long) The number of `by` field values that were analyzed by the models.+
  131. NOTE: The `by` field values are counted separately for each detector and partition.
  132. `total_over_field_count`::
  133. (long) The number of `over` field values that were analyzed by the models.+
  134. NOTE: The `over` field values are counted separately for each detector and partition.
  135. `total_partition_field_count`::
  136. (long) The number of `partition` field values that were analyzed by the models.
  137. `timestamp`::
  138. (date) The timestamp of the `model_size_stats` according to the timestamp of the data.
  139. [float]
  140. [[ml-forecastsstats]]
  141. ==== Forecasts Stats Objects
  142. The `forecasts_stats` object shows statistics about forecasts. It has the following properties:
  143. `total`::
  144. (long) The number of forecasts currently available for this model.
  145. `forecasted_jobs`::
  146. (long) The number of jobs that have at least one forecast.
  147. `memory_bytes`::
  148. (object) Statistics about the memory usage: minimum, maximum, average and total.
  149. `records`::
  150. (object) Statistics about the number of forecast records: minimum, maximum, average and total.
  151. `processing_time_ms`::
  152. (object) Statistics about the forecast runtime in milliseconds: minimum, maximum, average and total.
  153. `status`::
  154. (object) Counts per forecast status, for example: {"finished" : 2}.
  155. NOTE: `memory_bytes`, `records`, `processing_time_ms` and `status` require at least 1 forecast, otherwise
  156. these fields are omitted.
  157. [float]
  158. [[ml-stats-node]]
  159. ==== Node Objects
  160. The `node` objects contains properties for the node that runs the job.
  161. This information is available only for open jobs.
  162. `id`::
  163. (string) The unique identifier of the node.
  164. `name`::
  165. (string) The node name.
  166. `ephemeral_id`::
  167. (string) The ephemeral id of the node.
  168. `transport_address`::
  169. (string) The host and port where transport HTTP connections are accepted.
  170. `attributes`::
  171. (object) For example, {"ml.max_open_jobs": "10"}.