Installing Watcher

The Getting Started Guide steps through a basic Watcher installation. This section provides some additional information about the installation prerequisites, deployment options, and the installation process for RPM/DEB package installations.

Watcher Installation Prerequisites

All you need to use Watcher 2.4.6 is:

  • Java 7 or later
  • Elasticsearch 2.4.6
  • Elasticsearch License 2.4.6 plugin

For information about installing the latest Oracle JDK, see Java SE Downloads. For information about installing Elasticsearch, see Installation in the Elasticsearch Reference.

Important

You must run the version of Watcher that matches the version of Elasticsearch you are running.

Deploying Watcher on an Existing Cluster

Deploying watcher directly to the nodes of an existing cluster is generally the easiest way to get started with Watcher. Keep in mind, however, that this requires stopping and starting all of the nodes in your cluster. For larger clusters, we recommend deploying Watcher to a separate cluster.

When you deploy Watcher on an existing cluster, you use the search input to search the cluster’s indexes and load the results into a watch’s payload.

To deploy to an existing cluster, you need to install the License and Watcher plugins on every node in the cluster. For general installation instructions, see the Getting Started guide. If you are using the Elasticsearch DEB/RPM packages, see Installing Watcher on a DEB/RPM Package Installation for more information.

Deploying Watcher as a Separate Cluster

If you have a larger cluster, we recommend running Watcher on a separate monitoring cluster. If you’re using a separate cluster for Marvel, you can install Watcher on the nodes you’re using to store your Marvel data.

When you deploy watcher on a separate cluster, you use the HTTP input to send search requests to the cluster you are monitoring and load the results into a watch’s payload.

To deploy to a separate monitoring cluster, you need to install the License and Watcher plugins on every node in the monitoring cluster. For general installation instructions, see the Getting Started guide. If you are using the Elasticsearch DEB/RPM packages, see Installing Watcher on a DEB/RPM Package Installation for more information.

Installing Watcher on a DEB/RPM Package Installation

If you use the DEB/RPM packages to install Elasticsearch, by default Elasticsearch is installed in /usr/share/elasticsearch and the configuration files are stored in /etc/elasticsearch. (For the complete list of default paths, see Directory Layout in the Elasticsearch Reference.)

To install the Watcher and License plugins on a DEB/RPM package installation, you need to run bin/plugin install from the /usr/share/elasticsearch directory with superuser permissions. For example:

cd /usr/share/elasticsearch
sudo bin/plugin install license
sudo bin/plugin install watcher

Installing Watcher on Offline Machines

Elasticsearch’s bin/plugin script requires direct Internet access to download and install the License and Watcher plugins. If your server doesn’t have Internet access, you can manually download and install the plugins.

To install Watcher on a machine that doesn’t have Internet access:

  1. Manually download the License and Watcher binaries:

  2. Transfer the zip files to a temporary directory on the offline machine. (Do NOT put the zip files in the Elasticsearch plugins directory.)
  3. Run bin/plugin install to install the plugins using the zip files. For example:

    bin/plugin install file:///path/to/file/license-2.4.6.zip
    bin/plugin install file:///path/to/file/watcher-2.4.6.zip
    Note

    You must specify an absolute path to the zip file after the file:// protocol.

Upgrading Watcher

To upgrade Watcher.

  1. Back up all of the watches you’ve defined. You can search/scan the .watches index and save the returned watches aside.
  2. Stop Elasticsearch on all nodes in your cluster.
  3. Uninstall the Watcher plugin from each node:

    bin/plugin remove watcher
  4. Follow the instructions in the Getting Started guide to install the new plugin.
Note

If you are using a DEB/RPM distribution of Elasticsearch, you need to run the installation with superuser permissions. To perform an offline installation, download the Watcher binaries.

Uninstalling Watcher

To uninstall Watcher:

  1. Shut down Elasticsearch.
  2. Remove the Watcher plugin from Elasticsearch:

    bin/plugin remove watcher
  3. Restart Elasticsearch.