Standalone Elasticsearch plugin install

If you don’t want to use the all-in-one Open Distro for Elasticsearch installation options, you can install the Security, Alerting, and SQL plugins on a compatible Elasticsearch cluster just like any other Elasticsearch plugin.


Table of contents

  1. Plugin compatibility
  2. Install plugins
    1. Security
    2. Alerting
    3. SQL
    4. Index State Management
    5. Performance Analyzer
  3. List installed plugins
  4. Remove plugins
  5. Update plugins

Plugin compatibility

Elasticsearch version Plugin versions
7.2.0
opendistro-job-scheduler        1.2.0
opendistro_alerting             1.2.0.0
opendistro_performance_analyzer 1.2.0.0
opendistro_security             1.2.0.0
opendistro_sql                  1.2.0.0
7.1.1
opendistro-job-scheduler        1.1.0
opendistro_alerting             1.1.0.0
opendistro_performance_analyzer 1.1.0.0
opendistro_security             1.1.0.0
opendistro_sql                  1.1.0.0
7.0.1
opendistro-job-scheduler        1.0.0
opendistro_alerting             1.0.0.0
opendistro_performance_analyzer 1.0.0.0
opendistro_security             1.0.0.2
opendistro_sql                  1.0.0.0
6.8.1
opendistro_alerting             0.10.0.0
opendistro_performance_analyzer 0.10.0.0
opendistro_security             0.10.0.0
opendistro_sql                  0.10.0.0
6.7.1
opendistro_alerting             0.9.0.0
opendistro_performance_analyzer 0.9.0.0
opendistro_security             0.9.0.0
opendistro_sql                  0.9.0.0
6.6.2
opendistro_alerting             0.8.0.0
opendistro_performance_analyzer 0.8.0.0
opendistro_security             0.8.0.0
opendistro_sql                  0.8.0.0
6.5.4
opendistro_alerting             0.7.0.0
opendistro_performance_analyzer 0.7.0.0
opendistro_security             0.7.0.1
opendistro_sql                  0.7.0.0

To install plugins manually, you must have the exact OSS version of Elasticsearch installed (e.g. 6.6.2 and not 6.6.1). To get a list of available Elasticsearch versions on CentOS 7 and Amazon Linux 2:

sudo yum list elasticsearch-oss --showduplicates

Then you can specify the version you need:

sudo yum install elasticsearch-oss-6.7.1

Install plugins

Navigate to the Elasticsearch home directory (likely /usr/share/elasticsearch) and run the install command for each plugin.

Security

sudo bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-security/opendistro_security-1.2.0.0.zip

After installing the Security plugin, you can run sudo sh /usr/share/elasticsearch/plugins/opendistro_security/tools/install_demo_configuration.sh to quickly get started with demo certificates. Otherwise, you must configure it manually and run securityadmin.sh.

Security has a corresponding Kibana plugin that you probably want to install, as well.

Alerting

sudo bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-alerting/opendistro_alerting-1.2.0.0.zip

Alerting has a corresponding Kibana plugin that you probably want to install, as well.

SQL

sudo bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-sql/opendistro_sql-1.2.0.0.zip

Index State Management

This plugin is not officially released.

To beta test this plugin, download the latest release from GitHub and install the plugin:

sudo bin/elasticsearch-plugin install file:///path/to/file

Performance Analyzer

sudo bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/performance-analyzer/opendistro_performance_analyzer-1.2.0.0.zip

Performance Analyzer requires some manual configuration after installing the plugin:

  1. Create /usr/lib/systemd/system/opendistro-performance-analyzer.service based on this file.
  2. Create /usr/share/elasticsearch/bin/performance-analyzer-agent-cli based on this file.
  3. Make the CLI executable:

    sudo chmod +x /usr/share/elasticsearch/bin/performance-analyzer-agent-cli
    
  4. Create the postinit script for RPM-based or Debian-based distributions in your home directory.
  5. Run the script:

    sudo sh postinit 1
    
  6. Start the Elasticsearch service:

    sudo systemctl start elasticsearch.service
    
  7. Send a test request:

    curl -XGET "localhost:9600/_opendistro/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all"
    

List installed plugins

To check your installed plugins:

sudo bin/elasticsearch-plugin list

Remove plugins

sudo bin/elasticsearch-plugin remove <plugin-name>

Then restart Elasticsearch on the node.

Update plugins

Elasticsearch doesn’t update plugins. Instead, you have to remove and reinstall them:

sudo bin/elasticsearch-plugin remove <plugin-name>
sudo bin/elasticsearch-plugin install <plugin-name>