anomaly-detectors.asciidoc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. [role="xpack"]
  2. [[cat-anomaly-detectors]]
  3. === cat anomaly detectors API
  4. ++++
  5. <titleabbrev>cat anomaly detectors</titleabbrev>
  6. ++++
  7. .New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-cat[Compact and aligned text (CAT) APIs]..
  11. --
  12. [IMPORTANT]
  13. ====
  14. cat APIs are only intended for human consumption using the command line or {kib}
  15. console. They are _not_ intended for use by applications. For application
  16. consumption, use the
  17. <<ml-get-job-stats,get anomaly detection job statistics API>>.
  18. ====
  19. Returns configuration and usage information about {anomaly-jobs}.
  20. [[cat-anomaly-detectors-request]]
  21. ==== {api-request-title}
  22. `GET /_cat/ml/anomaly_detectors/<job_id>` +
  23. `GET /_cat/ml/anomaly_detectors`
  24. [[cat-anomaly-detectors-prereqs]]
  25. ==== {api-prereq-title}
  26. * If the {es} {security-features} are enabled, you must have `monitor_ml`,
  27. `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. See
  28. <<security-privileges>> and {ml-docs-setup-privileges}.
  29. [[cat-anomaly-detectors-desc]]
  30. ==== {api-description-title}
  31. NOTE: This API returns a maximum of 10,000 jobs.
  32. For more information about {anomaly-detect}, see
  33. {ml-docs}/ml-ad-finding-anomalies.html[Finding anomalies].
  34. [[cat-anomaly-detectors-path-params]]
  35. ==== {api-path-parms-title}
  36. `<job_id>`::
  37. (Optional, string)
  38. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
  39. [[cat-anomaly-detectors-query-params]]
  40. ==== {api-query-parms-title}
  41. `allow_no_match`::
  42. (Optional, Boolean)
  43. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=allow-no-match-jobs]
  44. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=bytes]
  45. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=http-format]
  46. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-h]
  47. +
  48. If you do not specify which columns to include, the API returns the default
  49. columns. If you explicitly specify one or more columns, it returns only the
  50. specified columns.
  51. +
  52. Valid columns are:
  53. `assignment_explanation`, `ae`:::
  54. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=assignment-explanation-anomaly-jobs]
  55. `buckets.count`, `bc`, `bucketsCount`:::
  56. (Default)
  57. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=bucket-count-anomaly-jobs]
  58. `buckets.time.exp_avg`, `btea`, `bucketsTimeExpAvg`:::
  59. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=bucket-time-exponential-average]
  60. `buckets.time.exp_avg_hour`, `bteah`, `bucketsTimeExpAvgHour`:::
  61. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=bucket-time-exponential-average-hour]
  62. `buckets.time.max`, `btmax`, `bucketsTimeMax`:::
  63. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=bucket-time-maximum]
  64. `buckets.time.min`, `btmin`, `bucketsTimeMin`:::
  65. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=bucket-time-minimum]
  66. `buckets.time.total`, `btt`, `bucketsTimeTotal`:::
  67. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=bucket-time-total]
  68. `data.buckets`, `db`, `dataBuckets`:::
  69. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=bucket-count]
  70. `data.earliest_record`, `der`, `dataEarliestRecord`:::
  71. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=earliest-record-timestamp]
  72. `data.empty_buckets`, `deb`, `dataEmptyBuckets`:::
  73. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=empty-bucket-count]
  74. `data.input_bytes`, `dib`, `dataInputBytes`:::
  75. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=input-bytes]
  76. `data.input_fields`, `dif`, `dataInputFields`:::
  77. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=input-field-count]
  78. `data.input_records`, `dir`, `dataInputRecords`:::
  79. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=input-record-count]
  80. `data.invalid_dates`, `did`, `dataInvalidDates`:::
  81. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=invalid-date-count]
  82. `data.last`, `dl`, `dataLast`:::
  83. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=last-data-time]
  84. `data.last_empty_bucket`, `dleb`, `dataLastEmptyBucket`:::
  85. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=latest-empty-bucket-timestamp]
  86. `data.last_sparse_bucket`, `dlsb`, `dataLastSparseBucket`:::
  87. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=latest-sparse-record-timestamp]
  88. `data.latest_record`, `dlr`, `dataLatestRecord`:::
  89. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=latest-record-timestamp]
  90. `data.missing_fields`, `dmf`, `dataMissingFields`:::
  91. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=missing-field-count]
  92. `data.out_of_order_timestamps`, `doot`, `dataOutOfOrderTimestamps`:::
  93. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=out-of-order-timestamp-count]
  94. `data.processed_fields`, `dpf`, `dataProcessedFields`:::
  95. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=processed-field-count]
  96. `data.processed_records`, `dpr`, `dataProcessedRecords`:::
  97. (Default)
  98. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=processed-record-count]
  99. `data.sparse_buckets`, `dsb`, `dataSparseBuckets`:::
  100. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=sparse-bucket-count]
  101. `forecasts.memory.avg`, `fmavg`, `forecastsMemoryAvg`:::
  102. The average memory usage in bytes for forecasts related to the {anomaly-job}.
  103. `forecasts.memory.max`, `fmmax`, `forecastsMemoryMax`:::
  104. The maximum memory usage in bytes for forecasts related to the {anomaly-job}.
  105. `forecasts.memory.min`, `fmmin`, `forecastsMemoryMin`:::
  106. The minimum memory usage in bytes for forecasts related to the {anomaly-job}.
  107. `forecasts.memory.total`, `fmt`, `forecastsMemoryTotal`:::
  108. The total memory usage in bytes for forecasts related to the {anomaly-job}.
  109. `forecasts.records.avg`, `fravg`, `forecastsRecordsAvg`:::
  110. The average number of `model_forecast` documents written for forecasts related
  111. to the {anomaly-job}.
  112. `forecasts.records.max`, `frmax`, `forecastsRecordsMax`:::
  113. The maximum number of `model_forecast` documents written for forecasts related
  114. to the {anomaly-job}.
  115. `forecasts.records.min`, `frmin`, `forecastsRecordsMin`:::
  116. The minimum number of `model_forecast` documents written for forecasts related
  117. to the {anomaly-job}.
  118. `forecasts.records.total`, `frt`, `forecastsRecordsTotal`:::
  119. The total number of `model_forecast` documents written for forecasts related to
  120. the {anomaly-job}.
  121. `forecasts.time.avg`, `ftavg`, `forecastsTimeAvg`:::
  122. The average runtime in milliseconds for forecasts related to the {anomaly-job}.
  123. `forecasts.time.max`, `ftmax`, `forecastsTimeMax`:::
  124. The maximum runtime in milliseconds for forecasts related to the {anomaly-job}.
  125. `forecasts.time.min`, `ftmin`, `forecastsTimeMin`:::
  126. The minimum runtime in milliseconds for forecasts related to the {anomaly-job}.
  127. `forecasts.time.total`, `ftt`, `forecastsTimeTotal`:::
  128. The total runtime in milliseconds for forecasts related to the {anomaly-job}.
  129. `forecasts.total`, `ft`, `forecastsTotal`:::
  130. (Default)
  131. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=forecast-total]
  132. `id`:::
  133. (Default)
  134. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
  135. `model.bucket_allocation_failures`, `mbaf`, `modelBucketAllocationFailures`:::
  136. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=bucket-allocation-failures-count]
  137. `model.by_fields`, `mbf`, `modelByFields`:::
  138. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=total-by-field-count]
  139. `model.bytes`, `mb`, `modelBytes`:::
  140. (Default)
  141. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=model-bytes]
  142. `model.bytes_exceeded`, `mbe`, `modelBytesExceeded`:::
  143. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=model-bytes-exceeded]
  144. `model.categorization_status`, `mcs`, `modelCategorizationStatus`:::
  145. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=categorization-status]
  146. `model.categorized_doc_count`, `mcdc`, `modelCategorizedDocCount`:::
  147. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=categorized-doc-count]
  148. `model.dead_category_count`, `mdcc`, `modelDeadCategoryCount`:::
  149. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=dead-category-count]
  150. `model.failed_category_count`, `mdcc`, `modelFailedCategoryCount`:::
  151. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=failed-category-count]
  152. `model.frequent_category_count`, `mfcc`, `modelFrequentCategoryCount`:::
  153. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=frequent-category-count]
  154. `model.log_time`, `mlt`, `modelLogTime`:::
  155. The timestamp when the model stats were gathered, according to server time.
  156. `model.memory_limit`, `mml`, `modelMemoryLimit`:::
  157. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=model-memory-limit-anomaly-jobs]
  158. `model.memory_status`, `mms`, `modelMemoryStatus`:::
  159. (Default)
  160. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=model-memory-status]
  161. `model.output_memory_allocator_bytes`, `momab`, `modelOutputMemoryAllocatorBytes`:::
  162. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=output-memory-allocator-bytes]
  163. `model.over_fields`, `mof`, `modelOverFields`:::
  164. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=total-over-field-count]
  165. `model.partition_fields`, `mpf`, `modelPartitionFields`:::
  166. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=total-partition-field-count]
  167. `model.rare_category_count`, `mrcc`, `modelRareCategoryCount`:::
  168. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=rare-category-count]
  169. `model.timestamp`, `mt`, `modelTimestamp`:::
  170. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=model-timestamp]
  171. `model.total_category_count`, `mtcc`, `modelTotalCategoryCount`:::
  172. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=total-category-count]
  173. `node.address`, `na`, `nodeAddress`:::
  174. The network address of the node.
  175. +
  176. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=node-jobs]
  177. `node.ephemeral_id`, `ne`, `nodeEphemeralId`:::
  178. The ephemeral ID of the node.
  179. +
  180. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=node-jobs]
  181. `node.id`, `ni`, `nodeId`:::
  182. The unique identifier of the node.
  183. +
  184. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=node-jobs]
  185. `node.name`, `nn`, `nodeName`:::
  186. The node name.
  187. +
  188. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=node-jobs]
  189. `opened_time`, `ot`:::
  190. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=open-time]
  191. `state`, `s`:::
  192. (Default)
  193. include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=state-anomaly-job]
  194. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=help]
  195. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-s]
  196. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=time]
  197. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=cat-v]
  198. [[cat-anomaly-detectors-example]]
  199. ==== {api-examples-title}
  200. [source,console]
  201. --------------------------------------------------
  202. GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true
  203. --------------------------------------------------
  204. // TEST[skip:kibana sample data]
  205. [source,console-result]
  206. ----
  207. id s dpr mb
  208. high_sum_total_sales closed 14022 1.5mb
  209. low_request_rate closed 1216 40.5kb
  210. response_code_rates closed 28146 132.7kb
  211. url_scanning closed 28146 501.6kb
  212. ----
  213. // TESTRESPONSE[skip:kibana sample data]