Search::Elasticsearch::Plugin::XPack::5_0::ML - Plugin providing ML API for Search::Elasticsearch 5.x
version 6.00
use Search::Elasticsearch(); my $es = Search::Elasticsearch->new( nodes => \@nodes, plugins => ['XPack'] ); my $response = $es->xpack->ml->start_datafeed(...)
This class extends the Search::Elasticsearch client with an ml namespace, to support the Machine Learning APIs. In other words, it can be used as follows:
ml
use Search::Elasticsearch(); my $es = Search::Elasticsearch->new( nodes => \@nodes, plugins => ['XPack'] ); my $response = $es->xpack->ml->start_datafeed(...);
The full documentation for the ML feature is available here: https://www.elastic.co/guide/en/x-pack/6.0/xpack-ml.html
put_datafeed()
$response = $es->xpack->ml->put_datafeed( datafeed_id => $id # required body => {...} # required )
The put_datafeed() method enables you to instantiate a datafeed.
See the put_datafeed docs for more information.
Query string parameters: error_trace, human
error_trace
human
delete_datafeed()
$response = $es->xpack->ml->delete_datafeed( datafeed_id => $id # required )
The delete_datafeed() method enables you to delete a datafeed.
See the delete_datafeed docs for more information.
Query string parameters: error_trace, force, human
force
start_datafeed()
$response = $es->xpack->ml->start_datafeed( datafeed_id => $id # required )
The start_datafeed() method enables you to start a datafeed.
See the start_datafeed docs for more information.
Query string parameters: end, error_trace, human, start, timeout
end
start
timeout
stop_datafeed()
$response = $es->xpack->ml->stop_datafeed( datafeed_id => $id # required )
The stop_datafeed() method enables you to stop a datafeed.
See the stop_datafeed docs for more information.
Query string parameters: error_trace, force, human, timeout
get_datafeeds()
$response = $es->xpack->ml->get_datafeeds( datafeed_id => $id # optional )
The get_datafeeds() method enables you to retrieve configuration information for datafeeds.
See the get_datafeeds docs for more information.
get_datafeed_stats()
$response = $es->xpack->ml->get_datafeed_stats( datafeed_id => $id # optional )
The get_datafeed_stats() method enables you to retrieve configuration information for datafeeds.
See the get_datafeed_stats docs for more information.
preview_datafeed()
$response = $es->xpack->ml->preview_datafeed( datafeed_id => $id # required )
The preview_datafeed() method enables you to preview a datafeed.
See the preview_datafeed docs for more information.
update_datafeed()
$response = $es->xpack->ml->update_datafeed( datafeed_id => $id # required body => {...} # required )
The update_datafeed() method enables you to update certain properties of a datafeed.
See the update_datafeed docs for more information.
put_job()
$response = $es->xpack->ml->put_job( job_id => $id # required body => {...} # required )
The put_job() method enables you to instantiate a job.
See the put_job docs for more information.
delete_job()
$response = $es->xpack->ml->delete_job( job_id => $id # required )
The delete_job() method enables you to delete a job.
See the delete_job docs for more information.
open_job()
$response = $es->xpack->ml->open_job( job_id => $id # required )
The open_job() method enables you to open a closed job.
See the open_job docs for more information.
close_job()
$response = $es->xpack->ml->close_job( job_id => $id # required )
The close_job() method enables you to close an open job.
See the close_job docs for more information.
get_jobs()
$response = $es->xpack->ml->get_jobs( job_id => $id # optional )
The get_jobs() method enables you to retrieve configuration information for jobs.
See the get_jobs docs for more information.
get_job_stats()
$response = $es->xpack->ml->get_jobs_stats( job_id => $id # optional )
The get_jobs_stats() method enables you to retrieve usage information for jobs.
get_jobs_stats()
See the get_job_statss docs for more information.
flush_job()
$response = $es->xpack->ml->flush_job( job_id => $id # required )
The flush_job() method forces any buffered data to be processed by the job.
See the flush_job docs for more information.
Query string parameters: advance_time, calc_interm, end, error_trace, human, skip_time, start
advance_time
calc_interm
skip_time
post_data()
$response = $es->xpack->ml->post_data( job_id => $id # required body => [data] # required )
The post_data() method enables you to send data to an anomaly detection job for analysis.
See the post_data docs for more information.
Query string parameters: error_trace, human, reset_end, reset_start
reset_end
reset_start
update_job()
$response = $es->xpack->ml->update_job( job_id => $id # required body => {...} # required )
The update_job() method enables you to update certain properties of a job.
See the update_job docs for more information.
delete_model_snapshot()
$response = $es->xpack->ml->delete_model_snapshot( snapshot_id => $id # required )
The delete_model_snapshot() method enables you to delete an existing model snapshot.
See the delete_model_snapshot docs for more information.
get_model_snapshots()
$response = $es->xpack->ml->get_model_snapshots( job_id => $job_id, # required snapshot_id => $snapshot_id # optional )
The get_model_snapshots() method enables you to retrieve information about model snapshots.
See the get_model_snapshots docs for more information.
Query string parameters: desc, end, error_trace, from, human, size, sort, start
desc
from
size
sort
revert_model_snapshot()
$response = $es->xpack->ml->revert_model_snapshot( job_id => $job_id, # required snapshot_id => $snapshot_id # required )
The revert_model_snapshots() method enables you to revert to a specific snapshot.
revert_model_snapshots()
See the revert_model_snapshot docs for more information.
Query string parameters: delete_intervening_results, error_trace, human
delete_intervening_results
update_model_snapshot()
$response = $es->xpack->ml->update_model_snapshot( job_id => $job_id, # required snapshot_id => $snapshot_id # required )
The update_model_snapshots() method enables you to update certain properties of a snapshot.
update_model_snapshots()
See the update_model_snapshot docs for more information.
get_buckets()
$response = $es->xpack->ml->get_buckets( job_id => $job_id, # required timestamp => $timestamp # optional )
The get_buckets() method enables you to retrieve job results for one or more buckets.
See the get_buckets docs for more information.
Query string parameters: anomaly_score, desc, end, error_trace, exclude_interim, expand, from, human, size, sort, start
anomaly_score
exclude_interim
expand
get_categories()
$response = $es->xpack->ml->get_categories( job_id => $job_id, # required category_id => $category_id # optional )
The get_categories() method enables you to retrieve job results for one or more categories.
See the get_categories docs for more information.
Query string parameters: error_trace, from, human, size
get_influencers()
$response = $es->xpack->ml->get_influencers( job_id => $job_id, # required )
The get_influencers() method enables you to retrieve job results for one or more influencers.
See the get_influencers docs for more information.
Query string parameters: desc, end, error_trace, exclude_interim, expand, from, human, influencer_score, size, sort, start
influencer_score
get_records()
$response = $es->xpack->ml->get_records( job_id => $job_id, # required )
The get_records() method enables you to retrieve anomaly records for a job.
See the get_records docs for more information.
Query string parameters: desc, end, error_trace, exclude_interim, expand, from, human, record_score, size, sort, start
record_score
Clinton Gormley <drtech@cpan.org>
This software is Copyright (c) 2017 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Search::Elasticsearch::Plugin::XPack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::Elasticsearch::Plugin::XPack
CPAN shell
perl -MCPAN -e shell install Search::Elasticsearch::Plugin::XPack
For more information on module installation, please visit the detailed CPAN module installation guide.