Search::Elasticsearch::Client::7_0::Direct::Watcher - Plugin providing Watcher API for Search::Elasticsearch 7.x
version 7.711
my $response = $es->watcher->start();
This class extends the Search::Elasticsearch client with a watcher namespace, to support the Watcher APIs.
watcher
The full documentation for the Watcher feature is available here: https://www.elastic.co/guide/en/x-pack/current/xpack-alerting.html
put_watch()
$response = $es->watcher->put_watch( id => $watch_id, # required body => {...} );
The put_watch() method is used to register a new watcher or to update an existing watcher.
See the put_watch docs for more information.
Query string parameters: active, error_trace, human, if_primary_term, if_seq_no, master_timeout, version
active
error_trace
human
if_primary_term
if_seq_no
master_timeout
version
get_watch()
$response = $es->watcher->get_watch( id => $watch_id, # required );
The get_watch() method is used to retrieve a watch by ID.
See the get_watch docs for more information.
Query string parameters: error_trace, human
delete_watch()
$response = $es->watcher->delete_watch( id => $watch_id, # required );
The delete_watch() method is used to delete a watch by ID.
Query string parameters: error_trace, force, human, master_timeout
force
See the delete_watch docs for more information.
execute_watch()
$response = $es->watcher->execute_watch( id => $watch_id, # optional body => {...} # optional );
The execute_watch() method forces the execution of a previously registered watch. Optional parameters may be passed in the body.
body
Query string parameters: debug, error_trace, human
debug
See the execute_watch docs for more information.
ack_watch()
$response = $es->watcher->ack_watch( watch_id => $watch_id, # required action_id => $action_id | \@action_ids # optional );
The ack_watch() method is used to manually throttle the execution of a watch.
Query string parameters: error_trace, human, master_timeout
See the ack_watch docs for more information.
activate_watch()
$response = $es->watcher->activate_watch( watch_id => $watch_id, # required );
The activate_watch() method is used to activate a deactive watch.
See the activate_watch docs for more information.
deactivate_watch()
$response = $es->watcher->deactivate_watch( watch_id => $watch_id, # required );
The deactivate_watch() method is used to deactivate an active watch.
See the deactivate_watch docs for more information.
stats()
$response = $es->watcher->stats( metric => $metric # optional );
The stats() method returns information about the status of the watcher plugin.
See the stats docs for more information.
stop()
$response = $es->watcher->stop();
The stop() method stops the watcher service if it is running.
See the stop docs for more information.
start()
$response = $es->watcher->start();
The start() method starts the watcher service if it is not already running.
See the start docs for more information.
restart()
$response = $es->watcher->restart();
The restart() method stops then starts the watcher service.
See the restart docs for more information.
Enrico Zimuel <enrico.zimuel@elastic.co>
This software is Copyright (c) 2021 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Search::Elasticsearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::Elasticsearch
CPAN shell
perl -MCPAN -e shell install Search::Elasticsearch
For more information on module installation, please visit the detailed CPAN module installation guide.