Browse Source

[DOCS] Minor fixes in ML APIs

lcawl 5 years ago
parent
commit
c7408a25f1
32 changed files with 37 additions and 110 deletions
  1. 2 2
      docs/reference/ml/anomaly-detection/apis/close-job.asciidoc
  2. 0 3
      docs/reference/ml/anomaly-detection/apis/delete-calendar-event.asciidoc
  3. 0 3
      docs/reference/ml/anomaly-detection/apis/delete-calendar-job.asciidoc
  4. 0 2
      docs/reference/ml/anomaly-detection/apis/delete-calendar.asciidoc
  5. 0 2
      docs/reference/ml/anomaly-detection/apis/delete-datafeed.asciidoc
  6. 0 2
      docs/reference/ml/anomaly-detection/apis/delete-filter.asciidoc
  7. 0 2
      docs/reference/ml/anomaly-detection/apis/delete-forecast.asciidoc
  8. 0 2
      docs/reference/ml/anomaly-detection/apis/delete-job.asciidoc
  9. 0 2
      docs/reference/ml/anomaly-detection/apis/delete-snapshot.asciidoc
  10. 2 4
      docs/reference/ml/anomaly-detection/apis/flush-job.asciidoc
  11. 1 4
      docs/reference/ml/anomaly-detection/apis/forecast.asciidoc
  12. 24 27
      docs/reference/ml/anomaly-detection/apis/get-bucket.asciidoc
  13. 0 3
      docs/reference/ml/anomaly-detection/apis/get-calendar-event.asciidoc
  14. 0 3
      docs/reference/ml/anomaly-detection/apis/get-calendar.asciidoc
  15. 0 3
      docs/reference/ml/anomaly-detection/apis/get-datafeed.asciidoc
  16. 0 3
      docs/reference/ml/anomaly-detection/apis/get-filter.asciidoc
  17. 1 1
      docs/reference/ml/anomaly-detection/apis/get-job-stats.asciidoc
  18. 0 2
      docs/reference/ml/anomaly-detection/apis/get-job.asciidoc
  19. 0 3
      docs/reference/ml/anomaly-detection/apis/get-overall-buckets.asciidoc
  20. 2 5
      docs/reference/ml/anomaly-detection/apis/open-job.asciidoc
  21. 0 2
      docs/reference/ml/anomaly-detection/apis/post-calendar-event.asciidoc
  22. 0 2
      docs/reference/ml/anomaly-detection/apis/put-datafeed.asciidoc
  23. 0 2
      docs/reference/ml/anomaly-detection/apis/put-filter.asciidoc
  24. 0 2
      docs/reference/ml/anomaly-detection/apis/put-job.asciidoc
  25. 3 5
      docs/reference/ml/anomaly-detection/apis/start-datafeed.asciidoc
  26. 2 4
      docs/reference/ml/anomaly-detection/apis/stop-datafeed.asciidoc
  27. 0 4
      docs/reference/ml/anomaly-detection/apis/update-datafeed.asciidoc
  28. 0 3
      docs/reference/ml/anomaly-detection/apis/update-filter.asciidoc
  29. 0 2
      docs/reference/ml/anomaly-detection/apis/update-job.asciidoc
  30. 0 2
      docs/reference/ml/anomaly-detection/apis/update-snapshot.asciidoc
  31. 0 2
      docs/reference/ml/anomaly-detection/apis/validate-detector.asciidoc
  32. 0 2
      docs/reference/ml/anomaly-detection/apis/validate-job.asciidoc

+ 2 - 2
docs/reference/ml/anomaly-detection/apis/close-job.asciidoc

@@ -92,9 +92,9 @@ The following example closes the `total-requests` job:
 
 [source,console]
 --------------------------------------------------
-POST _ml/anomaly_detectors/total-requests/_close
+POST _ml/anomaly_detectors/low_request_rate/_close
 --------------------------------------------------
-// TEST[skip:sometimes fails due to https://github.com/elastic/elasticsearch/pull/48583#issuecomment-552991325 - on unmuting use setup:server_metrics_openjob-raw]
+// TEST[skip:sometimes fails due to https://github.com/elastic/elasticsearch/pull/48583#issuecomment-552991325]
 
 When the job is closed, you receive the following results:
 

+ 0 - 3
docs/reference/ml/anomaly-detection/apis/delete-calendar-event.asciidoc

@@ -40,9 +40,6 @@ events and delete the calendar, see the
 [[ml-delete-calendar-event-example]]
 ==== {api-examples-title}
 
-The following example deletes a scheduled event from the `planned-outages`
-calendar:
-
 [source,console]
 --------------------------------------------------
 DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st

+ 0 - 3
docs/reference/ml/anomaly-detection/apis/delete-calendar-job.asciidoc

@@ -33,9 +33,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection-list]
 [[ml-delete-calendar-job-example]]
 ==== {api-examples-title}
 
-The following example removes the association between the `planned-outages`
-calendar and `total-requests` job:
-
 [source,console]
 --------------------------------------------------
 DELETE _ml/calendars/planned-outages/jobs/total-requests

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/delete-calendar.asciidoc

@@ -35,8 +35,6 @@ calendar.
 [[ml-delete-calendar-example]]
 ==== {api-examples-title}
 
-The following example deletes the `planned-outages` calendar:
-
 [source,console]
 --------------------------------------------------
 DELETE _ml/calendars/planned-outages

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/delete-datafeed.asciidoc

@@ -41,8 +41,6 @@ quicker than stopping and deleting the {dfeed}.
 [[ml-delete-datafeed-example]]
 ==== {api-examples-title}
 
-The following example deletes the `datafeed-total-requests` {dfeed}:
-
 [source,console]
 --------------------------------------------------
 DELETE _ml/datafeeds/datafeed-total-requests

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/delete-filter.asciidoc

@@ -36,8 +36,6 @@ update or delete the job before you can delete the filter.
 [[ml-delete-filter-example]]
 ==== {api-examples-title}
 
-The following example deletes the `safe_domains` filter:
-
 [source,console]
 --------------------------------------------------
 DELETE _ml/filters/safe_domains

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/delete-forecast.asciidoc

@@ -67,8 +67,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
 [[ml-delete-forecast-example]]
 ==== {api-examples-title}
 
-The following example deletes all forecasts from the `total-requests` job:
-
 [source,console]
 --------------------------------------------------
 DELETE _ml/anomaly_detectors/total-requests/_forecast/_all

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/delete-job.asciidoc

@@ -56,8 +56,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
 [[ml-delete-job-example]]
 ==== {api-examples-title}
 
-The following example deletes the `total-requests` job:
-
 [source,console]
 --------------------------------------------------
 DELETE _ml/anomaly_detectors/total-requests

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/delete-snapshot.asciidoc

@@ -40,8 +40,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=snapshot-id]
 [[ml-delete-snapshot-example]]
 ==== {api-examples-title}
 
-The following example deletes the `1491948163` snapshot:
-
 [source,console]
 --------------------------------------------------
 DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163

+ 2 - 4
docs/reference/ml/anomaly-detection/apis/flush-job.asciidoc

@@ -67,16 +67,14 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
 [[ml-flush-job-example]]
 ==== {api-examples-title}
 
-The following example flushes the `total-requests` job:
-
 [source,console]
 --------------------------------------------------
-POST _ml/anomaly_detectors/total-requests/_flush
+POST _ml/anomaly_detectors/low_request_rate/_flush
 {
   "calc_interim": true
 }
 --------------------------------------------------
-// TEST[skip:setup:server_metrics_openjob]
+// TEST[skip:Kibana sample data]
 
 When the operation succeeds, you receive the following results:
 

+ 1 - 4
docs/reference/ml/anomaly-detection/apis/forecast.asciidoc

@@ -57,11 +57,9 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
 [[ml-forecast-example]]
 ==== {api-examples-title}
 
-The following example requests a 10 day forecast for the `total-requests` job:
-
 [source,console]
 --------------------------------------------------
-POST _ml/anomaly_detectors/total-requests/_forecast
+POST _ml/anomaly_detectors/low_request_rate/_forecast
 {
   "duration": "10d"
 }
@@ -79,4 +77,3 @@ When the forecast is created, you receive the following results:
 // NOTCONSOLE
 
 You can subsequently see the forecast in the *Single Metric Viewer* in {kib}.
-

+ 24 - 27
docs/reference/ml/anomaly-detection/apis/get-bucket.asciidoc

@@ -170,50 +170,47 @@ the results for the bucket.
 [[ml-get-bucket-example]]
 ==== {api-examples-title}
 
-The following example gets bucket information for the `it-ops-kpi` job:
-
 [source,console]
 --------------------------------------------------
-GET _ml/anomaly_detectors/it-ops-kpi/results/buckets
+GET _ml/anomaly_detectors/low_request_rate/results/buckets
 {
   "anomaly_score": 80,
   "start": "1454530200001"
 }
 --------------------------------------------------
-// TEST[skip:todo]
+// TEST[skip:Kibana sample data]
 
 In this example, the API returns a single result that matches the specified
 score and time constraints:
 [source,js]
 ----
 {
-  "count": 1,
-  "buckets": [
+  "count" : 1,
+  "buckets" : [
     {
-      "job_id": "it-ops-kpi",
-      "timestamp": 1454943900000,
-      "anomaly_score": 94.1706,
-      "bucket_span": 300,
-      "initial_anomaly_score": 94.1706,
-      "event_count": 153,
-      "is_interim": false,
-      "bucket_influencers": [
+      "job_id" : "low_request_rate",
+      "timestamp" : 1578398400000,
+      "anomaly_score" : 91.58505459594764,
+      "bucket_span" : 3600,
+      "initial_anomaly_score" : 91.58505459594764,
+      "event_count" : 0,
+      "is_interim" : false,
+      "bucket_influencers" : [
         {
-          "job_id": "it-ops-kpi",
-          "result_type": "bucket_influencer",
-          "influencer_field_name": "bucket_time",
-          "initial_anomaly_score": 94.1706,
-          "anomaly_score": 94.1706,
-          "raw_anomaly_score": 2.32119,
-          "probability": 0.00000575042,
-          "timestamp": 1454943900000,
-          "bucket_span": 300,
-          "is_interim": false
+          "job_id" : "low_request_rate",
+          "result_type" : "bucket_influencer",
+          "influencer_field_name" : "bucket_time",
+          "initial_anomaly_score" : 91.58505459594764,
+          "anomaly_score" : 91.58505459594764,
+          "raw_anomaly_score" : 0.5758246639716365,
+          "probability" : 1.7340849573442696E-4,
+          "timestamp" : 1578398400000,
+          "bucket_span" : 3600,
+          "is_interim" : false
         }
       ],
-      "processing_time_ms": 2,
-      "partition_scores": [],
-      "result_type": "bucket"
+      "processing_time_ms" : 0,
+      "result_type" : "bucket"
     }
   ]
 }

+ 0 - 3
docs/reference/ml/anomaly-detection/apis/get-calendar-event.asciidoc

@@ -80,9 +80,6 @@ following properties:
 [[ml-get-calendar-event-example]]
 ==== {api-examples-title}
 
-The following example gets information about the scheduled events in the
-`planned-outages` calendar:
-
 [source,console]
 --------------------------------------------------
 GET _ml/calendars/planned-outages/events

+ 0 - 3
docs/reference/ml/anomaly-detection/apis/get-calendar.asciidoc

@@ -62,9 +62,6 @@ properties:
 [[ml-get-calendar-example]]
 ==== {api-examples-title}
 
-The following example gets configuration information for the `planned-outages`
-calendar:
-
 [source,console]
 --------------------------------------------------
 GET _ml/calendars/planned-outages

+ 0 - 3
docs/reference/ml/anomaly-detection/apis/get-datafeed.asciidoc

@@ -73,9 +73,6 @@ see <<ml-put-datafeed-request-body,create {dfeeds} API>>.
 [[ml-get-datafeed-example]]
 ==== {api-examples-title}
 
-The following example gets configuration information for the
-`datafeed-high_sum_total_sales` {dfeed}:
-
 [source,console]
 --------------------------------------------------
 GET _ml/datafeeds/datafeed-high_sum_total_sales

+ 0 - 3
docs/reference/ml/anomaly-detection/apis/get-filter.asciidoc

@@ -61,9 +61,6 @@ properties:
 [[ml-get-filter-example]]
 ==== {api-examples-title}
 
-The following example gets configuration information for the `safe_domains`
-filter:
-
 [source,console]
 --------------------------------------------------
 GET _ml/filters/safe_domains

+ 1 - 1
docs/reference/ml/anomaly-detection/apis/get-job-stats.asciidoc

@@ -165,7 +165,7 @@ NOTE: Unless there is at least one forecast, `memory_bytes`, `records`,
 
 `forecasts_stats`.`records`:::
 (object) Statistics about the number of forecast records: minimum, maximum,
-saverage and total.
+average and total.
 
 `forecasts_stats`.`processing_time_ms`:::
 (object) Statistics about the forecast runtime in milliseconds: minimum, maximum,

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/get-job.asciidoc

@@ -86,8 +86,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=model-snapshot-id]
 [[ml-get-job-example]]
 ==== {api-examples-title}
 
-//The following example gets configuration information for the `total-requests` job:
-
 [source,console]
 --------------------------------------------------
 GET _ml/anomaly_detectors/high_sum_total_sales

+ 0 - 3
docs/reference/ml/anomaly-detection/apis/get-overall-buckets.asciidoc

@@ -120,9 +120,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=timestamp-results]
 [[ml-get-overall-buckets-example]]
 ==== {api-examples-title}
 
-The following example gets overall buckets for {anomaly-jobs} with IDs matching
-`job-*`:
-
 [source,console]
 --------------------------------------------------
 GET _ml/anomaly_detectors/job-*/results/overall_buckets

+ 2 - 5
docs/reference/ml/anomaly-detection/apis/open-job.asciidoc

@@ -50,17 +50,14 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
 [[ml-open-job-example]]
 ==== {api-examples-title}
 
-The following example opens the `total-requests` job and sets an optional
-property:
-
 [source,console]
 --------------------------------------------------
-POST _ml/anomaly_detectors/total-requests/_open
+POST _ml/anomaly_detectors/low_request_rate/_open
 {
   "timeout": "35m"
 }
 --------------------------------------------------
-// TEST[skip:setup:server_metrics_job]
+// TEST[skip:Kibana sample data]
 
 When the job opens, you receive the following results:
 

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/post-calendar-event.asciidoc

@@ -58,8 +58,6 @@ of which must have a start time, end time, and description.
 [[ml-post-calendar-event-example]]
 ==== {api-examples-title}
 
-You can add scheduled events to the `planned-outages` calendar as follows:
-
 [source,console]
 --------------------------------------------------
 POST _ml/calendars/planned-outages/events

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/put-datafeed.asciidoc

@@ -96,8 +96,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=scroll-size]
 [[ml-put-datafeed-example]]
 ==== {api-examples-title}
 
-The following example creates the `datafeed-total-requests` {dfeed}:
-
 [source,console]
 --------------------------------------------------
 PUT _ml/datafeeds/datafeed-total-requests

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/put-filter.asciidoc

@@ -47,8 +47,6 @@ the `custom_rules` property of detector configuration objects.
 [[ml-put-filter-example]]
 ==== {api-examples-title}
 
-The following example creates the `safe_domains` filter:
-
 [source,console]
 --------------------------------------------------
 PUT _ml/filters/safe_domains

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/put-job.asciidoc

@@ -231,8 +231,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=results-retention-days]
 [[ml-put-job-example]]
 ==== {api-examples-title}
 
-The following example creates the `total-requests` job:
-
 [source,console]
 --------------------------------------------------
 PUT _ml/anomaly_detectors/total-requests

+ 3 - 5
docs/reference/ml/anomaly-detection/apis/start-datafeed.asciidoc

@@ -95,16 +95,14 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=datafeed-id]
 [[ml-start-datafeed-example]]
 ==== {api-examples-title}
 
-The following example starts the `datafeed-it-ops-kpi` {dfeed}:
-
 [source,console]
 --------------------------------------------------
-POST _ml/datafeeds/datafeed-total-requests/_start
+POST _ml/datafeeds/datafeed-low_request_rate/_start
 {
-  "start": "2017-04-07T18:22:16Z"
+  "start": "2019-04-07T18:22:16Z"
 }
 --------------------------------------------------
-// TEST[skip:setup:server_metrics_openjob]
+// TEST[skip:Kibana sample data]
 
 When the {dfeed} starts, you receive the following results:
 

+ 2 - 4
docs/reference/ml/anomaly-detection/apis/stop-datafeed.asciidoc

@@ -70,16 +70,14 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-datafeeds]
 [[ml-stop-datafeed-example]]
 ==== {api-examples-title}
 
-The following example stops the `datafeed-total-requests` {dfeed}:
-
 [source,console]
 --------------------------------------------------
-POST _ml/datafeeds/datafeed-total-requests/_stop
+POST _ml/datafeeds/datafeed-low_request_rate/_stop
 {
   "timeout": "30s"
 }
 --------------------------------------------------
-// TEST[skip:setup:server_metrics_startdf]
+// TEST[skip:Kibana sample data]
 
 When the {dfeed} stops, you receive the following results:
 

+ 0 - 4
docs/reference/ml/anomaly-detection/apis/update-datafeed.asciidoc

@@ -104,9 +104,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=scroll-size]
 [[ml-update-datafeed-example]]
 ==== {api-examples-title}
 
-The following example updates the query for the `datafeed-total-requests`
-{dfeed} so that only log entries of error level are analyzed:
-
 [source,console]
 --------------------------------------------------
 POST _ml/datafeeds/datafeed-total-requests/_update
@@ -120,7 +117,6 @@ POST _ml/datafeeds/datafeed-total-requests/_update
 --------------------------------------------------
 // TEST[skip:setup:server_metrics_datafeed]
 
-
 When the {dfeed} is updated, you receive the full {dfeed} configuration with
 with the updated values:
 

+ 0 - 3
docs/reference/ml/anomaly-detection/apis/update-filter.asciidoc

@@ -41,9 +41,6 @@ Updates the description of a filter, adds items, or removes items.
 [[ml-update-filter-example]]
 ==== {api-examples-title}
 
-You can change the description, add and remove items to the `safe_domains`
-filter as follows:
-
 [source,console]
 --------------------------------------------------
 POST _ml/filters/safe_domains/_update

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/update-job.asciidoc

@@ -162,8 +162,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=results-retention-days]
 [[ml-update-job-example]]
 ==== {api-examples-title}
 
-The following example updates the `total-requests` job:
-
 [source,console]
 --------------------------------------------------
 POST _ml/anomaly_detectors/total-requests/_update

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/update-snapshot.asciidoc

@@ -48,8 +48,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=retain]
 [[ml-update-snapshot-example]]
 ==== {api-examples-title}
 
-The following example updates the snapshot identified as `1491852978`:
-
 [source,console]
 --------------------------------------------------
 POST

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/validate-detector.asciidoc

@@ -107,8 +107,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=use-null]
 [[ml-valid-detector-example]]
 ==== {api-examples-title}
 
-The following example validates detector configuration information:
-
 [source,console]
 --------------------------------------------------
 POST _ml/anomaly_detectors/_validate/detector

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/validate-job.asciidoc

@@ -35,8 +35,6 @@ see <<ml-put-job-request-body>>.
 [[ml-valid-job-example]]
 ==== {api-examples-title}
 
-The following example validates job configuration information:
-
 [source,console]
 --------------------------------------------------
 POST _ml/anomaly_detectors/_validate