anomaly-detectors.asciidoc 10 KB

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