OpenSearch/watcher
uboness e6dfa215b6 Introducing Watch De/activateion
Today, once you add a watch to watcher, it's always active. Being "active" means that the watch is registered with the trigger engine (scheduled) and will be executed when its trigger is triggered.

Quite often, ppl want to have an option to deactivate/disable a registered watch. Such that while the watch definition still exists in watcher, it is "inactive" and is never triggered. The only way to do this today is using a "hack" where you can change the watch schedule to a cron expression targeting a really far date in the future (say somewhere around 2050). Again.. this is very hackish and it requires changing the actual definition of the watch (you loose its original trigger).

 This commit introduces the notion of an active/inactive watch.. here are the differences between the two states:

 - active: the watch is registered with watcher and with the trigger engine and will be executed when its trigger is fired by the engine
 - inactive: the watch is registered with watcher, but is not registered with the trigger engine. An inactive watch will never be fired, regardless of its trigger.

 This commit also adds two new APIs:

  - `_watcher/watch/{id}/_activate`
  - `_watcher/watch/{id}/_deactivate`

 to activate and deactivate existing watches.

 In addition, the Put Watch API now accepts an `active` parameter that indicates the initial state of the put watch (by default set to  `true`, i.e. "active").

 Closes elastic/elasticsearch#90

Original commit: elastic/x-pack-elasticsearch@37b9ab4d54
2015-09-04 21:38:34 +02:00
..
.settings get watcher verify working 2015-07-22 09:49:57 -04:00
bin/watcher initial migration of watcher 2015-07-13 12:23:07 +02:00
dev-tools [maven] fix build issues with artifactId renaming 2015-08-18 18:03:40 +02:00
docs Introducing Watch De/activateion 2015-09-04 21:38:34 +02:00
rest-api-spec Introducing Watch De/activateion 2015-09-04 21:38:34 +02:00
src Introducing Watch De/activateion 2015-09-04 21:38:34 +02:00
LICENSE.txt initial migration of watcher 2015-07-13 12:23:07 +02:00
NOTICE.txt initial migration of watcher 2015-07-13 12:23:07 +02:00
README.asciidoc initial migration of watcher 2015-07-13 12:23:07 +02:00
pom.xml Bumped the version to 3.0.0-SNAPSHOT 2015-09-04 16:30:11 +02:00

README.asciidoc

= Elasticsearch Watcher Plugin

This plugins adds conditioned scheduled tasks features to elasticsearch - such a task is called a `Watch`.

You can build the plugin with `mvn package`.

The documentation is put in the `docs/` directory.