Commit Graph

96 Commits

Author SHA1 Message Date
Dimitris Athanasiou e396c61afc [ML] Remove forecast end param (elastic/x-pack-elasticsearch#3121)
The forecast API provides a `duration` parameters
which is the most convenient way of specifying
the span of the forecast. End time is now unnecessary
and possibly confusing.

Relates elastic/machine-learning-cpp#443

Original commit: elastic/x-pack-elasticsearch@04eb0408e7
2017-11-28 10:49:15 +00:00
Lisa Cawley a7456cd87d [DOCS] Enabled code snippet testing for start datafeed API (elastic/x-pack-elasticsearch#3055)
* [DOCS] Enabled code snippet testing for start datafeed API

* [DOCS] Added datafeed creation to build.gradle

Original commit: elastic/x-pack-elasticsearch@1acb452cf0
2017-11-27 10:57:37 -08:00
Lisa Cawley b5d42c40e4 [DOCS] Enabled code snippet testing in stop datafeed API (elastic/x-pack-elasticsearch#3127)
Original commit: elastic/x-pack-elasticsearch@282eb587d5
2017-11-27 10:15:46 -08:00
Russ Cam e4e8870b13 Add opening state to Job states (elastic/x-pack-elasticsearch#2317)
Also updated open state to opened.

Original commit: elastic/x-pack-elasticsearch@663d95db1a
2017-11-24 11:35:51 +00:00
lcawley 4d24748170 [DOCS] Added requirement to forecast API
Original commit: elastic/x-pack-elasticsearch@3f1360ca2b
2017-11-23 15:54:04 -08:00
Lisa Cawley a9b3cd747f [DOCS] Added ML forecast API (elastic/x-pack-elasticsearch#2745)
* [DOCS] Added ML forecast API

* [DOCS] Added forecast API to build.gradle

* [DOCS] Added forecast API example

* [DOCS] Fixed forecast API intro

* [DOCS] Addressed feedback on forecast API

* [DOCS] Added duration to forecast API

* [DOCS] Removed end time from forecast API

* [DOCS] Fixed gradle errors for forecast API

Original commit: elastic/x-pack-elasticsearch@db79e3d5bb
2017-11-23 11:52:37 -08:00
lcawley 32d0c1b0c7 [DOCS] Re-enabled code snippet testing
Original commit: elastic/x-pack-elasticsearch@31fd4c3668
2017-11-17 13:40:46 -08:00
lcawley b8aefcc1e7 [DOCS] Added testresponse substitution to avoid gradle issues
Original commit: elastic/x-pack-elasticsearch@531579a626
2017-11-01 08:25:46 -07:00
David Kyle fe21003341 [DOCS] Mute failing test snippet
Original commit: elastic/x-pack-elasticsearch@0a2a90bbed
2017-11-01 11:05:17 +00:00
Lisa Cawley f69f6cd341 [DOCS] Enabled code snippet testing for datafeed APIs (elastic/x-pack-elasticsearch#2811)
* [DOCS] Enabled code snippet testing for put datafeed API

* [DOCS] Addressed gradle errors in put datafeed API

* [DOCS] Added job creation test to build.gradle

Original commit: elastic/x-pack-elasticsearch@3548d920c7
2017-10-30 07:54:33 -07:00
Dimitris Athanasiou c7e94b3b4c [ML] Enable overall buckets aggregation at a custom bucket span (elastic/x-pack-elasticsearch#2782)
For the purpose of getting this API consumed by our UI, returning
overall buckets that match the job's largest `bucket_span` can
result in too much data. The UI only ever displays a few buckets
in the swimlane. Their span depends on the time range selected and
the screen resolution, but it will only ever be a relatively
low number.

This PR adds the ability to aggregate overall buckets in a user
specified `bucket_span`. That `bucket_span` may be equal or
greater to the largest job's `bucket_span`. The `overall_score`
of the result overall buckets is the max score of the
corresponding overall buckets with a span equal to the job's
largest `bucket_span`.

The implementation is now chunking the bucket requests
as otherwise the aggregation would fail when too many buckets
are matching.

Original commit: elastic/x-pack-elasticsearch@981f7a40e5
2017-10-27 11:14:13 +01:00
Lisa Cawley c67ec73cb5 [DOCS] Add xpack.ml.max_model_memory_limit (elastic/x-pack-elasticsearch#2787)
* [DOCS] Add xpack.ml.max.model_memory_limit

* [DOCS] Addressed feedback on model limit setting

Original commit: elastic/x-pack-elasticsearch@77a10bfe0e
2017-10-25 09:15:19 -07:00
Lisa Cawley 2455415a04 [DOCS] Small fixes in the overall buckets API (elastic/x-pack-elasticsearch#2732)
* [DOCS] Small fixes in the overall buckets API

* [DOCS] Addressed feedback in overall buckets API

Original commit: elastic/x-pack-elasticsearch@4f79bc9a50
2017-10-11 16:25:05 +01:00
David Roberts c84d69fde3 [DOCS] Fix ML post_data docs (elastic/x-pack-elasticsearch#2689)
It was pointed out in
https://github.com/elastic/elasticsearch-net/pull/2856#discussion_r142830656
that our post_data docs incorrectly say that reset_start and reset_end are
body parameters.  In fact they are query parameters.

There were also a number of other errors and ommissions on this page that I
have attempted to correct.

Original commit: elastic/x-pack-elasticsearch@c83decacc7
2017-10-11 10:47:07 +01:00
Dimitris Athanasiou 5eea355b33 [ML] Add overall buckets api (elastic/x-pack-elasticsearch#2713)
Adds the GET overall_buckets API.

The REST end point is: GET
/_xpack/ml/anomaly_detectors/job_id/results/overall_buckets

The API returns overall bucket results. An overall bucket
is a summarized bucket result over multiple jobs.
It has the `bucket_span` of the longest job's `bucket_span`.
It also has an `overall_score` that is the `top_n` average of the
max anomaly scores per job.

relates elastic/x-pack-elasticsearch#2693

Original commit: elastic/x-pack-elasticsearch@ba6061482d
2017-10-10 14:41:24 +01:00
Dimitris Athanasiou 90e327032e [ML][DOCS] Fix bucket_span type in results resources (elastic/x-pack-elasticsearch#2714)
Original commit: elastic/x-pack-elasticsearch@af24bde71f
2017-10-10 12:51:12 +01:00
Russ Cam 9b97f50001 [DOCS] Update type for category_id (elastic/x-pack-elasticsearch#2197)
Make category_id a long to align with the implementation.

Original commit: elastic/x-pack-elasticsearch@9873824281
2017-09-27 15:08:37 +01:00
lcawley af2b2ca542 [DOCS] Add random default datafeed query delay
Original commit: elastic/x-pack-elasticsearch@d886f09192
2017-09-19 09:54:11 -07:00
David Roberts ea94ef3aa9 [ML] Update docs for change to default model memory limit (elastic/x-pack-elasticsearch#2308)
This is the doc change for elastic/x-pack-elasticsearch#2300

Original commit: elastic/x-pack-elasticsearch@acd683d06a
2017-08-21 16:51:30 +01:00
Lisa Cawley 702c192c35 [DOCS] Fix model_plot_config in ML create job API (elastic/x-pack-elasticsearch#2316)
Original commit: elastic/x-pack-elasticsearch@2ef32e52cd
2017-08-18 15:06:24 -07:00
Lisa Cawley 17b4720df7 [DOCS] Add missing ML create job API options (elastic/x-pack-elasticsearch#2268)
* [DOCS] Add missing ML create job API options

* [DOCS] Small fixes in ML create job API

Original commit: elastic/x-pack-elasticsearch@369bd5bfbb
2017-08-18 13:00:15 -07:00
Lisa Cawley d76969a431 [DOCS] Update example for default model memory limit (elastic/x-pack-elasticsearch#2312)
Original commit: elastic/x-pack-elasticsearch@815d63d1bf
2017-08-18 11:29:08 -07:00
Lisa Cawley e97b6dcc47 [DOCS] Add job groups to ML create/update job APIs (elastic/x-pack-elasticsearch#2290)
* [DOCS] Add job groups to ML create/update job APIs

* [DOCS] Fix ML update job API example

* [DOCS] Address feedback for ML create/update job APIs

Original commit: elastic/x-pack-elasticsearch@0e7bb47342
2017-08-17 12:52:29 -07:00
David Roberts cb3f3d2d04 [ML] Switch from max_running_jobs to xpack.ml.max_open_jobs (elastic/x-pack-elasticsearch#2232)
This change makes 2 improvements to the max_running_jobs setting:

1. Namespaces it by adding the xpack.ml. prefix
2. Renames "running" to "open", because the "running" terminology
   is not used elsewhere

The old max_running_jobs setting is used as a fallback if the new
xpack.ml.max_open_jobs setting is not specified.  max_running_jobs
is deprecated and (to ease backporting in the short term) will be
removed from 7.0 in a different PR closer to release of 7.0.

Relates elastic/x-pack-elasticsearch#2185

Original commit: elastic/x-pack-elasticsearch@18c539f9bb
2017-08-11 09:00:33 +01:00
David Kyle c4910098b0 [Docs] Change indexes -> indices in datafeed config example (elastic/x-pack-elasticsearch#2227)
Original commit: elastic/x-pack-elasticsearch@7ddd36360e
2017-08-10 16:22:59 +01:00
Lisa Cawley 1bb3ad38c7 [DOCS] Update APIs for multiple jobs or datafeeds (elastic/x-pack-elasticsearch#2105)
* [DOCS] Update APIs for multiple jobs or datafeeds

* [DOCS] Fix syntax diagrams for ML stop/close APIs

* [DOCS] Removed TBD authorization for ML APIs

Original commit: elastic/x-pack-elasticsearch@1a9137a5a7
2017-08-09 08:30:21 -07:00
Lisa Cawley bf92450fc4 [DOCS] Update multivariate_by_fields (elastic/x-pack-elasticsearch#2147)
Original commit: elastic/x-pack-elasticsearch@a26025ac5e
2017-08-02 08:25:46 -07:00
Lisa Cawley 6614c86413 [DOCS] Fix ML latency definition (elastic/x-pack-elasticsearch#2091)
Original commit: elastic/x-pack-elasticsearch@78c9cb387c
2017-07-27 08:25:14 -07:00
Lisa Cawley 1159f7bfa4 [DOCS] Fix update snapshot API description (elastic/x-pack-elasticsearch#2089)
Original commit: elastic/x-pack-elasticsearch@3d98bfad3f
2017-07-27 08:17:17 -07:00
Lisa Cawley 449064337d [DOCS] Clarify null behaviour in ML resources (elastic/x-pack-elasticsearch#2090)
* [DOCS] Clarify null behaviour in ML resources

* [DOCS] Add category error information

Original commit: elastic/x-pack-elasticsearch@21cdb4fb36
2017-07-27 08:02:46 -07:00
Lisa Cawley 31b02c3941 [DOCS] Update model_memory_limit (elastic/x-pack-elasticsearch#1928)
* [DOCS] Update model_memory_limit

* [DOCS] Clarify minimum model_memory_limit value

* [DOCS] More updates to model_memory_limit

* [DOCS] Address feedback in jobresource.asciidoc

Original commit: elastic/x-pack-elasticsearch@3c62719037
2017-07-10 08:50:38 -07:00
Dimitris Athanasiou 4e03c657a3 [ML] Write model_memory_limit with units into the cluster state (elastic/x-pack-elasticsearch#1934)
This is step 2 of elastic/x-pack-elasticsearch#1604

This change stores `model_memory_limit` as a string with `mb` unit.
I considered using the `toString` method of `ByteSizeValue` but it
can lead to accuracy loss. Adding the fixed `mb` unit maintains
the accuracy, while making clear what unit the value is in.

Original commit: elastic/x-pack-elasticsearch@4dc48f0ce8
2017-07-06 15:40:19 +01:00
Lisa Cawley 2f1693c0fd [DOCS] Update ML open job API (elastic/x-pack-elasticsearch#1875)
Original commit: elastic/x-pack-elasticsearch@00a76d79ae
2017-06-28 10:27:05 -07:00
Sophie Chang a9f86f6d1b [DOCS] Model plot updates (elastic/x-pack-elasticsearch#1803)
* [DOCS] Model plot updates

Add to job create.
Remove terms from job resource.

* [DOCS] Describing terms as experimental

Original commit: elastic/x-pack-elasticsearch@815fa0ec37
2017-06-28 07:40:08 -07:00
lcawley 0b51f7326d [DOCS] Fixed terms typo
Original commit: elastic/x-pack-elasticsearch@25d5e829d3
2017-06-26 07:46:47 -07:00
Lisa Cawley 2b1d5f2cf2 [DOCS] Add ML configuration details and examples for script fields (elastic/x-pack-elasticsearch#1593)
* [DOCS] Add ML info about script fields

* [DOCS] Add links to ML script fields page

* [DOCS] Add ML API examples to transforms.asciidoc

* [DOCS] Addressed feedback in ML script field examples

* [DOCS] Add preview to ML script fields example

* [DOCS] Expanded code snippets in ML transform examples

* [DOCS] Add output for ML scripted fields example

* [DOCS] Add output for more ML scripted field examples

* [DOCS] Add output for final ML scripted field examples

* [DOC] Add Kibana details for ML script fields

* [DOCS] Remove example from ML transforms

Original commit: elastic/x-pack-elasticsearch@51057b029f
2017-06-23 11:42:37 -07:00
lcawley 431118b123 [DOCS] Add links to population analysis
Original commit: elastic/x-pack-elasticsearch@52e1cd36e2
2017-06-23 11:24:47 -07:00
Lisa Cawley b41ff62bcc [DOCS] Update ML APIs for Elasticsearch Reference (elastic/x-pack-elasticsearch#1718)
* [DOCS] Update ML APIs for Elasticsearch Reference

* [DOCS] Add X-Pack icon for ML APIs

* [DOCS] Add role attribute to ML APIs

Original commit: elastic/x-pack-elasticsearch@997ea39759
2017-06-19 18:23:58 -07:00
David Roberts 03652e7497 [ML] Kill autodetect on force close and isolated node rejoining (elastic/x-pack-elasticsearch#1742)
Prior to this change, if the persistent tasks framework noticed that a
job was running on a node that was isolated but has rejoined the cluster
then it would close that job.  This was not ideal, because then the job
would persist state from the autodetect process that was isolated.  This
commit changes the behaviour to kill the autodetect process associated
with such a job, so that it does not interfere with the autodetect process
that is running on the node where the persistent tasks framework thinks it
should be running.

In order to achieve this a change has also been made to the behaviour of
force-close.  Previously this would result in the autodetect process being
gracefully shut down asynchronously to the force-close request.  However,
the mechanism by which this happened was the same as the mechanism for
cancelling tasks that end up running on more than one node due to nodes
becoming isolated from the cluster.  Therefore, force-close now also kills
the autodetect process rather than gracefully stopping it.  The documentation
has been changed to reflect this.  It should not be a problem as force-close
is supposed to be a last resort for when normal close fails.

relates elastic/x-pack-elasticsearch#1186

Original commit: elastic/x-pack-elasticsearch@578c944371
2017-06-19 10:16:51 +01:00
Lisa Cawley 62ee1bc635 [DOCS] Add ML categorization of messages (elastic/x-pack-elasticsearch#1666)
* [DOCS] Add ML categorization of messages

* [DOCS] Describe ML categorization_examples_limit property

* [DOCS] Updated ML categorization of messages

* [DOCS] Add links to ML categorization

Original commit: elastic/x-pack-elasticsearch@6403f6ce84
2017-06-12 10:41:14 -07:00
Ryan Ernst c1a3f50e19 Convert script uses to use source/id keys (elastic/x-pack-elasticsearch#1670)
This is the xpack side of
https://github.com/elastic/elasticsearch/pull/25127

Original commit: elastic/x-pack-elasticsearch@e25bd90825
2017-06-09 08:29:36 -07:00
Lisa Cawley 15e4958d4e [DOCS] Update get datafeed statistics API output (elastic/x-pack-elasticsearch#1678)
Original commit: elastic/x-pack-elasticsearch@7e65102ac0
2017-06-09 07:48:51 -07:00
Lisa Cawley e29ab36849 [DOCS] Describe how to identify active ML model snapshot (elastic/x-pack-elasticsearch#1677)
Original commit: elastic/x-pack-elasticsearch@61766d0975
2017-06-08 16:02:41 -07:00
Lisa Cawley 63138f02c5 [DOCS] Move ML APIs up a level in TOC (elastic/x-pack-elasticsearch#1644)
Original commit: elastic/x-pack-elasticsearch@6048721806
2017-06-06 13:42:47 -07:00
Dimitris Athanasiou 3f6e640f90 [ML] Add force delete datafeed action (elastic/x-pack-elasticsearch#1623)
When a user or client intend to delete a datafeed
and its job, there is benefit into ensuring the
datafeed has gracefully stopped (ie no data loss).
In constrast, the desired behaviour is to stop and
delete the datafeed as quickly as possible.

This change adds a force option to the delete
datafeed action. When the delete is forced,
the datafeed is isolated, its task removed and,
finally, the datafeed itself is removed from the
metadata.

relates elastic/x-pack-elasticsearch#1533

Original commit: elastic/x-pack-elasticsearch@5ae0168bf2
2017-06-06 13:39:36 +01:00
David Kyle ce0315abc4 [ML] Add force delete job option (elastic/x-pack-elasticsearch#1612)
* Add force delete job option

* Can’t kill a process on a 5.4 node

* Address review comments

* Rename KillAutodetectAction -> KillProcessAction

* Review comments

* Cancelling task is superfluous after it has been killed

* Update docs

* Revert "Cancelling task is superfluous after it has been killed"

This reverts commit 576950e2e1ee095b38174d8b71de353c082ae953.

* Remove unnecessary TODOs and logic that doesn't alwasys force close

Original commit: elastic/x-pack-elasticsearch@f8c8b38217
2017-06-06 09:41:33 +01:00
David Roberts babe27afe0 [ML] Add a detector_index field to detectors, and use it for updates (elastic/x-pack-elasticsearch#1613)
Detectors now have a field called detector_index.  This is also now the
field that needs to be supplied when updating a detector.  (Previously
it was simply index, which was confusing.)

When detectors are added to an analysis_config it will reassign
ascending detector_index values starting from 0.  The intention is
never to allow deletion of detectors from an analysis_config, but
possibly to allow disabling them in the future.  This ensures that
detector_index values in results will always tie up with detector_ids
in the detectors that created them.

relates elastic/x-pack-elasticsearch#1275

Original commit: elastic/x-pack-elasticsearch@20a660b07b
2017-06-02 10:26:01 +01:00
David Roberts cc96580cd6 [ML] Remove record_count from bucket results (elastic/x-pack-elasticsearch#1568)
relates elastic/x-pack-elasticsearch#1564

Original commit: elastic/x-pack-elasticsearch@0caff1a735
2017-05-26 16:57:40 +01:00
David Kyle d9882be292 [ML] Use unique and predictable IDs for result docs (elastic/x-pack-elasticsearch#1521)
* Remove sequenceNum from anomaly records and influencers

* Generate unqiue IDs without sequence numbers

* Remove more instances of sequence_num

* Handle parsing sequnce_num from v5.4

Original commit: elastic/x-pack-elasticsearch@e60b206daf
2017-05-24 09:59:17 +01:00
Lisa Cawley 386ac7345c [DOCS] Add details about using aggregations with machine learning (elastic/x-pack-elasticsearch#1446)
* [DOCS] Add ML aggregations configuration scenario

* [DOCS] Refine ML configuration page

* [DOCS] Add ML aggregation details

* [DOCS] Add links to aggregations in Configuring ML

* [DOCS] Address feedback about ML aggregations

Original commit: elastic/x-pack-elasticsearch@8474144093
2017-05-23 14:34:21 -07:00