Installing Graph

edit

To install Graph, you install two components: an Elasticsearch plugin that provides the Graph API, and a Kibana plugin that provides the interactive Graph UI.

For basic installation instructions, see Getting Started with Graph.

Graph Installation Prerequisites

edit

Graph 2.3.5 requires:

  • Java 7 or later
  • Elasticsearch 2.3.5
  • Kibana 4.5.3
  • Elasticsearch License 2.3.5 plugin
  • A modern web browser - Supported Browsers

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

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

Installing Graph on a DEB/RPM Package Installation

edit

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 License plugin and the Graph plugin on a DEB/RPM package installation, you need to run bin/plugin install from the /usr/share/elasticsearch directory with superuser permissions:

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

If the configuration files are not in /etc/elasticsearch you need to specify the location of the configuration files by including -Des.path.conf.

Installing Graph on Offline Machines

edit

The Elasticsearch bin/plugin script and bin/kibana plugin require Internet access to download and install the License and Graph plugins. If your server doesn’t have Internet access, you can manually download and install the plugins.

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

  1. Manually download the License and Graph binaries:

  2. Transfer the archive files to a temporary directory on the offline machine. (Do NOT put the archive files in the Elasticsearch plugins directory.)
  3. Specify the archive files when you run bin/plugin and bin/kibana:

    bin/plugin install file:///path/to/file/license-2.3.5.zip
    bin/plugin install file:///path/to/file/graph-2.3.5.zip
    bin/kibana plugin --install graph --url file:///path/to/file/graph-2.3.5.tar.gz

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

Using Graph with Shield

edit

If you are using Shield to secure your Elasticsearch cluster, you need to follow the instructions in Using Kibana 4 with Shield to set up user authentication and secure communications.

Upgrading Graph

edit

When upgrading Graph, you must upgrade the Graph plugin on every node. You do not need to fully shut down your production cluster to perform the upgrade, you can perform a rolling upgrade.

You must run the version of Graph that matches the version of Elasticsearch you are running. For example, Graph 2.3.5 requires Elasticsearch 2.3.5.

To upgrade Graph:

  1. Disable shard reallocation on the nodes you are monitoring. While this is optional, it enables a faster startup after cluster shutdown. If you don’t disable shard reallocation, the nodes immediately start trying to replicate shards to each other on startup and spend a lot of time on wasted I/O. With shard reallocation disabled, the nodes join the cluster with their indices intact and do not attempt to rebalance. After startup is complete, you can turn reallocation back on.

    curl -XPUT localhost:9200/_cluster/settings -d '{
      "transient" : {
        "cluster.routing.allocation.enable" : "none"
      }
    }'
  2. Upgrade each node, one at a time:

    1. Stop Elasticsearch.
    2. Remove the old version of the Graph plugin from Elasticsearch:

      bin/plugin remove graph
    3. Install the new version of the Graph plugin:

      bin/plugin install graph
    4. Start Elasticsearch and confirm that the node rejoins the cluster and that there are no errors in the logs.
  3. When you’ve upgraded all of the nodes in the cluster, reenable shard allocation:

    curl -XPUT localhost:9200/_cluster/settings -d '{
      "transient" : {
          "cluster.routing.allocation.enable" : "all"
      }
    }'
  4. Upgrade the Graph Kibana plugin:

    1. Stop Kibana.
    2. Remove the old version of the Graph plugin:

      bin/kibana plugin --remove graph
    3. Install the new version of the Graph plugin:

      bin/kibana plugin --install graph/{version}
    4. Restart Kibana by running bin/kibana.

Uninstalling Graph

edit

To uninstall Graph:

  1. Shut down Elasticsearch and Kibana.
  2. Remove the Graph plugin from Elasticsearch:

    bin/plugin remove graph
  3. Remove the Graph Kibana plugin:

    bin/kibana plugin --remove graph
  4. Restart Elasticsearch and Kibana.