elasticsearch-xpack 5.5.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/Rakefile +16 -30
- data/elasticsearch-xpack.gemspec +3 -4
- data/examples/watcher/error_500.rb +23 -14
- data/lib/elasticsearch/xpack/api/actions/license/delete.rb +1 -1
- data/lib/elasticsearch/xpack/api/actions/license/get.rb +1 -1
- data/lib/elasticsearch/xpack/api/actions/license/post.rb +1 -1
- data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +3 -1
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +1 -1
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +0 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +0 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +6 -3
- data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +31 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +6 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +9 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +1 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +5 -1
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +7 -3
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +44 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +4 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +0 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +4 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +4 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +4 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +3 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +2 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +3 -2
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +1 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +0 -4
- data/lib/elasticsearch/xpack/api/actions/migration/deprecations.rb +26 -0
- data/lib/elasticsearch/xpack/api/actions/migration/get_assistance.rb +33 -0
- data/lib/elasticsearch/xpack/api/actions/migration/upgrade.rb +31 -0
- data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +1 -0
- data/lib/elasticsearch/xpack/api/actions/ssl/certificates.rb +19 -0
- data/lib/elasticsearch/xpack/api/namespace/migration.rb +18 -0
- data/lib/elasticsearch/xpack/api/namespace/ssl.rb +18 -0
- data/lib/elasticsearch/xpack/version.rb +1 -1
- metadata +19 -25
@@ -4,16 +4,20 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Retrieve configuration information for datafeeds
|
8
8
|
#
|
9
|
-
# @option arguments [String] :datafeed_id The ID of the datafeeds to fetch
|
9
|
+
# @option arguments [String] :datafeed_id The ID of the datafeeds stats to fetch
|
10
|
+
# @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
|
10
11
|
#
|
11
|
-
# @see http://www.elastic.co/guide/en/
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html
|
12
13
|
#
|
13
14
|
def get_datafeeds(arguments={})
|
15
|
+
valid_params = [
|
16
|
+
:allow_no_datafeeds ]
|
17
|
+
|
14
18
|
method = Elasticsearch::API::HTTP_GET
|
15
|
-
path = "_xpack/ml/datafeeds
|
16
|
-
params =
|
19
|
+
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/datafeeds", arguments[:datafeed_id]
|
20
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
17
21
|
body = nil
|
18
22
|
|
19
23
|
perform_request(method, path, params, body).body
|
@@ -4,20 +4,16 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
# TODO: Description
|
8
|
-
#
|
9
7
|
# @option arguments [String] :filter_id The ID of the filter to fetch
|
10
8
|
# @option arguments [Int] :from skips a number of filters
|
11
9
|
# @option arguments [Int] :size specifies a max number of filters to get
|
12
10
|
#
|
13
|
-
# @see [TODO]
|
14
|
-
#
|
15
11
|
def get_filters(arguments={})
|
16
12
|
valid_params = [
|
17
13
|
:from,
|
18
14
|
:size ]
|
19
15
|
method = Elasticsearch::API::HTTP_GET
|
20
|
-
path = "_xpack/ml/filters
|
16
|
+
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/filters", arguments[:filter_id]
|
21
17
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
22
18
|
body = nil
|
23
19
|
|
@@ -4,7 +4,7 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Retrieve job results for one or more influencers
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id [TODO] (*Required*)
|
10
10
|
# @option arguments [Hash] :body Influencer selection criteria
|
@@ -17,7 +17,7 @@ module Elasticsearch
|
|
17
17
|
# @option arguments [String] :sort sort field for the requested influencers
|
18
18
|
# @option arguments [Boolean] :desc whether the results should be sorted in decending order
|
19
19
|
#
|
20
|
-
# @see http://www.elastic.co/guide/en/
|
20
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
|
21
21
|
#
|
22
22
|
def get_influencers(arguments={})
|
23
23
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
@@ -7,13 +7,17 @@ module Elasticsearch
|
|
7
7
|
# TODO: Description
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The ID of the jobs stats to fetch
|
10
|
+
# @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
|
10
11
|
#
|
11
12
|
# @see http://www.elastic.co/guide/en/x-pack/current/ml-get-job-stats.html
|
12
13
|
#
|
13
14
|
def get_job_stats(arguments={})
|
15
|
+
valid_params = [
|
16
|
+
:allow_no_jobs ]
|
17
|
+
|
14
18
|
method = Elasticsearch::API::HTTP_GET
|
15
19
|
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/_stats"
|
16
|
-
params =
|
20
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
17
21
|
body = nil
|
18
22
|
|
19
23
|
perform_request(method, path, params, body).body
|
@@ -4,16 +4,20 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Retrieve configuration information for jobs
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The ID of the jobs to fetch
|
10
|
+
# @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
|
10
11
|
#
|
11
|
-
# @see http://www.elastic.co/guide/en/
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html
|
12
13
|
#
|
13
14
|
def get_jobs(arguments={})
|
15
|
+
valid_params = [
|
16
|
+
:allow_no_jobs ]
|
17
|
+
|
14
18
|
method = Elasticsearch::API::HTTP_GET
|
15
19
|
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}"
|
16
|
-
params =
|
20
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
17
21
|
body = nil
|
18
22
|
|
19
23
|
perform_request(method, path, params, body).body
|
@@ -4,7 +4,7 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Retrieve information about model snapshots
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The ID of the job to fetch (*Required*)
|
10
10
|
# @option arguments [String] :snapshot_id The ID of the snapshot to fetch
|
@@ -16,7 +16,7 @@ module Elasticsearch
|
|
16
16
|
# @option arguments [String] :sort Name of the field to sort on
|
17
17
|
# @option arguments [Boolean] :desc True if the results should be sorted in descending order
|
18
18
|
#
|
19
|
-
# @see http://www.elastic.co/guide/en/
|
19
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html
|
20
20
|
#
|
21
21
|
def get_model_snapshots(arguments={})
|
22
22
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# Retrieve overall bucket results that summarize the bucket results of multiple jobs
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id The job IDs for which to calculate overall bucket results (*Required*)
|
10
|
+
# @option arguments [Hash] :body Overall bucket selection details if not provided in URI
|
11
|
+
# @option arguments [Int] :top_n The number of top job bucket scores to be used in the overall_score calculation
|
12
|
+
# @option arguments [String] :bucket_span The span of the overall buckets. Defaults to the longest job bucket_span
|
13
|
+
# @option arguments [Double] :overall_score Returns overall buckets with overall scores higher than this value
|
14
|
+
# @option arguments [Boolean] :exclude_interim If true overall buckets that include interim buckets will be excluded
|
15
|
+
# @option arguments [String] :start Returns overall buckets with timestamps after this time
|
16
|
+
# @option arguments [String] :end Returns overall buckets with timestamps earlier than this time
|
17
|
+
# @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
|
18
|
+
#
|
19
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html
|
20
|
+
#
|
21
|
+
def get_overall_buckets(arguments={})
|
22
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
23
|
+
|
24
|
+
valid_params = [
|
25
|
+
:top_n,
|
26
|
+
:bucket_span,
|
27
|
+
:overall_score,
|
28
|
+
:exclude_interim,
|
29
|
+
:start,
|
30
|
+
:end,
|
31
|
+
:allow_no_jobs ]
|
32
|
+
|
33
|
+
method = Elasticsearch::API::HTTP_GET
|
34
|
+
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/results/overall_buckets"
|
35
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
36
|
+
body = arguments[:body]
|
37
|
+
|
38
|
+
perform_request(method, path, params, body).body
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -4,7 +4,7 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Retrieve anomaly records for a job
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id [TODO] (*Required*)
|
10
10
|
# @option arguments [Hash] :body Record selection criteria
|
@@ -17,10 +17,11 @@ module Elasticsearch
|
|
17
17
|
# @option arguments [String] :sort Sort records by a particular field
|
18
18
|
# @option arguments [Boolean] :desc Set the sort direction
|
19
19
|
#
|
20
|
-
# @see http://www.elastic.co/guide/en/
|
20
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html
|
21
21
|
#
|
22
22
|
def get_records(arguments={})
|
23
23
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
24
|
+
|
24
25
|
valid_params = [
|
25
26
|
:exclude_interim,
|
26
27
|
:from,
|
@@ -30,6 +31,7 @@ module Elasticsearch
|
|
30
31
|
:record_score,
|
31
32
|
:sort,
|
32
33
|
:desc ]
|
34
|
+
|
33
35
|
method = Elasticsearch::API::HTTP_GET
|
34
36
|
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/results/records"
|
35
37
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
@@ -4,13 +4,13 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Open a job to receive and analyze data
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The ID of the job to open (*Required*)
|
10
10
|
# @option arguments [Boolean] :ignore_downtime Controls if gaps in data are treated as anomalous or as a maintenance window after a job re-start
|
11
11
|
# @option arguments [Time] :timeout Controls the time to wait until a job has opened. Default to 30 minutes
|
12
12
|
#
|
13
|
-
# @see http://www.elastic.co/guide/en/
|
13
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html
|
14
14
|
#
|
15
15
|
def open_job(arguments={})
|
16
16
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
@@ -4,14 +4,14 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Send data to an anomaly detection job for analysis
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The name of the job receiving the data (*Required*)
|
10
10
|
# @option arguments [Hash] :body The data to process (*Required*)
|
11
11
|
# @option arguments [String] :reset_start Optional parameter to specify the start of the bucket resetting range
|
12
12
|
# @option arguments [String] :reset_end Optional parameter to specify the end of the bucket resetting range
|
13
13
|
#
|
14
|
-
# @see http://www.elastic.co/guide/en/
|
14
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html
|
15
15
|
#
|
16
16
|
def post_data(arguments={})
|
17
17
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
@@ -4,11 +4,11 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Preview a datafeed
|
8
8
|
#
|
9
9
|
# @option arguments [String] :datafeed_id The ID of the datafeed to preview (*Required*)
|
10
10
|
#
|
11
|
-
# @see http://www.elastic.co/guide/en/
|
11
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html
|
12
12
|
#
|
13
13
|
def preview_datafeed(arguments={})
|
14
14
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
@@ -4,12 +4,12 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Create a new datafeed
|
8
8
|
#
|
9
9
|
# @option arguments [String] :datafeed_id The ID of the datafeed to create (*Required*)
|
10
10
|
# @option arguments [Hash] :body The datafeed config (*Required*)
|
11
11
|
#
|
12
|
-
# @see http://www.elastic.co/guide/en/
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
|
13
13
|
#
|
14
14
|
def put_datafeed(arguments={})
|
15
15
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
@@ -4,13 +4,9 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
# TODO: Description
|
8
|
-
#
|
9
7
|
# @option arguments [String] :filter_id The ID of the filter to create (*Required*)
|
10
8
|
# @option arguments [Hash] :body The filter details (*Required*)
|
11
9
|
#
|
12
|
-
# @see [TODO]
|
13
|
-
#
|
14
10
|
def put_filter(arguments={})
|
15
11
|
raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id]
|
16
12
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
@@ -4,12 +4,12 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Create a new job
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The ID of the job to create (*Required*)
|
10
10
|
# @option arguments [Hash] :body The job (*Required*)
|
11
11
|
#
|
12
|
-
# @see http://www.elastic.co/guide/en/
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html
|
13
13
|
#
|
14
14
|
def put_job(arguments={})
|
15
15
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
@@ -4,19 +4,21 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Revert to a specific snapshot (eg. before a highly-anomalous, but insignificant event)
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The ID of the job to fetch (*Required*)
|
10
10
|
# @option arguments [String] :snapshot_id The ID of the snapshot to revert to
|
11
11
|
# @option arguments [Hash] :body Reversion options
|
12
12
|
# @option arguments [Boolean] :delete_intervening_results Should we reset the results back to the time of the snapshot?
|
13
13
|
#
|
14
|
-
# @see http://www.elastic.co/guide/en/
|
14
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html
|
15
15
|
#
|
16
16
|
def revert_model_snapshot(arguments={})
|
17
17
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
18
|
+
|
18
19
|
valid_params = [
|
19
20
|
:delete_intervening_results ]
|
21
|
+
|
20
22
|
method = Elasticsearch::API::HTTP_POST
|
21
23
|
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/anomaly_detectors", arguments[:job_id], "model_snapshots", arguments[:snapshot_id], "_revert"
|
22
24
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
@@ -4,7 +4,7 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Start a datafeed
|
8
8
|
#
|
9
9
|
# @option arguments [String] :datafeed_id The ID of the datafeed to start (*Required*)
|
10
10
|
# @option arguments [Hash] :body The start datafeed parameters
|
@@ -12,14 +12,16 @@ module Elasticsearch
|
|
12
12
|
# @option arguments [String] :end The end time when the datafeed should stop. When not set, the datafeed continues in real time
|
13
13
|
# @option arguments [Time] :timeout Controls the time to wait until a datafeed has started. Default to 20 seconds
|
14
14
|
#
|
15
|
-
# @see http://www.elastic.co/guide/en/
|
15
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html
|
16
16
|
#
|
17
17
|
def start_datafeed(arguments={})
|
18
18
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
19
|
+
|
19
20
|
valid_params = [
|
20
21
|
:start,
|
21
22
|
:end,
|
22
23
|
:timeout ]
|
24
|
+
|
23
25
|
method = Elasticsearch::API::HTTP_POST
|
24
26
|
path = "_xpack/ml/datafeeds/#{arguments[:datafeed_id]}/_start"
|
25
27
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
@@ -4,17 +4,19 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Stop a datafeed
|
8
8
|
#
|
9
9
|
# @option arguments [String] :datafeed_id The ID of the datafeed to stop (*Required*)
|
10
|
+
# @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
|
10
11
|
# @option arguments [Boolean] :force True if the datafeed should be forcefully stopped.
|
11
12
|
# @option arguments [Time] :timeout Controls the time to wait until a datafeed has stopped. Default to 20 seconds
|
12
13
|
#
|
13
|
-
# @see http://www.elastic.co/guide/en/
|
14
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html
|
14
15
|
#
|
15
16
|
def stop_datafeed(arguments={})
|
16
17
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
17
18
|
valid_params = [
|
19
|
+
:allow_no_datafeeds,
|
18
20
|
:force,
|
19
21
|
:timeout ]
|
20
22
|
method = Elasticsearch::API::HTTP_POST
|
@@ -4,16 +4,17 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Update certain properties of a datafeed
|
8
8
|
#
|
9
9
|
# @option arguments [String] :datafeed_id The ID of the datafeed to update (*Required*)
|
10
10
|
# @option arguments [Hash] :body The datafeed update settings (*Required*)
|
11
11
|
#
|
12
|
-
# @see http://www.elastic.co/guide/en/
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html
|
13
13
|
#
|
14
14
|
def update_datafeed(arguments={})
|
15
15
|
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
16
16
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
17
|
+
|
17
18
|
method = Elasticsearch::API::HTTP_POST
|
18
19
|
path = "_xpack/ml/datafeeds/#{arguments[:datafeed_id]}/_update"
|
19
20
|
params = {}
|
@@ -4,12 +4,12 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Update certain properties of a job
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The ID of the job to create (*Required*)
|
10
10
|
# @option arguments [Hash] :body The job update settings (*Required*)
|
11
11
|
#
|
12
|
-
# @see http://www.elastic.co/guide/en/
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html
|
13
13
|
#
|
14
14
|
def update_job(arguments={})
|
15
15
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
@@ -4,18 +4,19 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
#
|
7
|
+
# Update certain properties of a snapshot
|
8
8
|
#
|
9
9
|
# @option arguments [String] :job_id The ID of the job to fetch (*Required*)
|
10
10
|
# @option arguments [String] :snapshot_id The ID of the snapshot to update (*Required*)
|
11
11
|
# @option arguments [Hash] :body The model snapshot properties to update (*Required*)
|
12
12
|
#
|
13
|
-
# @see http://www.elastic.co/guide/en/
|
13
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html
|
14
14
|
#
|
15
15
|
def update_model_snapshot(arguments={})
|
16
16
|
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
17
17
|
raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id]
|
18
18
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
19
|
+
|
19
20
|
method = Elasticsearch::API::HTTP_POST
|
20
21
|
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/model_snapshots/#{arguments[:snapshot_id]}/_update"
|
21
22
|
params = {}
|
@@ -4,14 +4,11 @@ module Elasticsearch
|
|
4
4
|
module MachineLearning
|
5
5
|
module Actions
|
6
6
|
|
7
|
-
# TODO: Description
|
8
|
-
#
|
9
7
|
# @option arguments [Hash] :body The job config (*Required*)
|
10
8
|
#
|
11
|
-
# @see http://www.elastic.co/guide/en/x-pack/current/ml-valid-job.html
|
12
|
-
#
|
13
9
|
def validate(arguments={})
|
14
10
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
11
|
+
|
15
12
|
method = Elasticsearch::API::HTTP_POST
|
16
13
|
path = "_xpack/ml/anomaly_detectors/_validate"
|
17
14
|
params = {}
|