opensearch-docs-cn/_opensearch/install/plugins.md

9.1 KiB

layout title parent nav_order
default OpenSearch plugins Install OpenSearch 90

Standalone OpenSearch plugin installation

If you don't want to use the all-in-one OpenSearch installation options, you can install the individual plugins on a compatible OpenSearch cluster, just like any other plugin.


Table of contents

  1. TOC {:toc}

Plugin compatibility

OpenSearch version Plugin versions
1.0.0
opensearch-alerting             1.0.0.0
opensearch-anomaly-detection    1.0.0.0
opensearch-asynchronous-search  1.0.0.0
opensearch-index-management     1.0.0.0
opensearch-job-scheduler        1.0.0.0
opensearch-knn                  1.0.0.0
opensearch-notebooks            1.0.0.0
opensearch-performance-analyzer 1.0.0.0
opensearch-reports-scheduler    1.0.0.0
opensearch-security             1.0.0.0
opensearch-sql                  1.0.0.0
1.0.0-rc1
opensearch-alerting             1.0.0.0-rc1
opensearch-anomaly-detection    1.0.0.0-rc1
opensearch-asynchronous-search  1.0.0.0-rc1
opensearch-index-management     1.0.0.0-rc1
opensearch-job-scheduler        1.0.0.0-rc1
opensearch-knn                  1.0.0.0-rc1
opensearch-notebooks            1.0.0.0-rc1
opensearch-performance-analyzer 1.0.0.0-rc1
opensearch-reports-scheduler    1.0.0.0-rc1
opensearch-security             1.0.0.0-rc1
opensearch-sql                  1.0.0.0-rc1
1.0.0-beta1
opensearch-alerting             1.0.0.0-beta1
opensearch-anomaly-detection    1.0.0.0-beta1
opensearch-asynchronous-search  1.0.0.0-beta1
opensearch-index-management     1.0.0.0-beta1
opensearch-job-scheduler        1.0.0.0-beta1
opensearch-knn                  1.0.0.0-beta1
opensearch-performance-analyzer 1.0.0.0-beta1
opensearch-reports-scheduler    1.0.0.0-beta1
opensearch-security             1.0.0.0-beta1
opensearch-sql                  1.0.0.0-beta1

To install plugins manually, you must have the exact version of OpenSearch installed, down to the minor version.

{% comment %}

To get a list of available OpenSearch versions on CentOS 7 and Amazon Linux 2, run the following command:

sudo yum list opensearch-oss --showduplicates

Then you can specify the version that you need:

sudo yum install opensearch-oss-6.7.1

Install plugins

Navigate to the OpenSearch home directory (most likely, it is /usr/share/opensearch), and run the install command for each plugin.

Security

sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/opensearch-security/opensearch-security-{{site.opensearch_major_minor_version}}.1.0.zip

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

The security plugin has a corresponding OpenSearch Dashboards plugin that you probably want to install as well.

Job scheduler

sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/opensearch-job-scheduler/opensearch-job-scheduler-{{site.opensearch_major_minor_version}}.0.0.zip

Alerting

sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/opensearch-alerting/opensearch-alerting-{{site.opensearch_major_minor_version}}.1.0.zip

To install Alerting, you must first install the Job Scheduler plugin. Alerting has a corresponding OpenSearch Dashboards plugin that you probably want to install as well.

SQL

sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/opensearch-sql/opensearch-sql-{{site.opensearch_major_minor_version}}.2.0.zip

Reports scheduler

sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/opensearch-reports-scheduler/opensearch-reports-scheduler-{{site.opensearch_major_minor_version}}.0.0.zip

Index State Management

sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/opensearch-index-management/opensearch-index-management-{{site.opensearch_major_minor_version}}.2.0.zip

To install Index State Management, you must first install the Job Scheduler plugin. ISM has a corresponding OpenSearch Dashboards plugin that you probably want to install as well.

k-NN

k-NN is only available as part of the all-in-one installs: Docker, RPM, and Debian.

Anomaly detection

sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/opensearch-anomaly-detection/opensearch-anomaly-detection-{{site.opensearch_major_minor_version}}.0.0.zip
sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/opensearch-asynchronous-search/opensearch-asynchronous-search-{{site.opensearch_major_minor_version}}.0.1.zip

Performance Analyzer

sudo bin/opensearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/opensearch-plugins/performance-analyzer/opensearch-performance-analyzer-{{site.opensearch_major_minor_version}}.0.0.zip

Performance Analyzer requires some manual configuration after installing the plugin:

  1. Create /usr/lib/systemd/system/opensearch-performance-analyzer.service based on this file.

  2. Make the CLI executable:

    sudo chmod +x /usr/share/opensearch/bin/performance-analyzer-agent-cli
    
  3. Run the appropriate postinst script for your Linux distribution:

    # Debian-based distros
    sudo sh /usr/share/opensearch/plugins/opensearch-performance-analyzer/install/deb/postinst.sh 1
    
    # RPM distros
    sudo sh /usr/share/opensearch/plugins/opensearch-performance-analyzer/install/rpm/postinst.sh 1
    
  4. Make Performance Analyzer accessible outside of the host machine

    cd /usr/share/opensearch # navigate to the OpenSearch home directory
    cd plugins/opensearch_performance_analyzer/pa_config/
    vi performance-analyzer.properties
    

    Uncomment the line #webservice-bind-host and set it to 0.0.0.0:

    # ======================== OpenSearch performance analyzer plugin config =========================
    
    # NOTE: this is an example for Linux. Please modify the config accordingly if you are using it under other OS.
    
    # WebService bind host; default to all interfaces
    webservice-bind-host = 0.0.0.0
    
    # Metrics data location
    metrics-location = /dev/shm/performanceanalyzer/
    
    # Metrics deletion interval (minutes) for metrics data.
    # Interval should be between 1 to 60.
    metrics-deletion-interval = 1
    
    # If set to true, the system cleans up the files behind it. So at any point, we should expect only 2
    # metrics-db-file-prefix-path files. If set to false, no files are cleaned up. This  can be useful, if you are archiving
    # the files and wouldn't like for them to be cleaned up.
    cleanup-metrics-db-files = true
    
    # WebService exposed by App's port
    webservice-listener-port = 9600
    
    # Metric DB File Prefix Path location
    metrics-db-file-prefix-path = /tmp/metricsdb_
    
    https-enabled = false
    
    #Setup the correct path for certificates
    certificate-file-path = specify_path
    
    private-key-file-path = specify_path
    
    # Plugin Stats Metadata file name, expected to be in the same location
    plugin-stats-metadata = plugin-stats-metadata
    
    # Agent Stats Metadata file name, expected to be in the same location
    agent-stats-metadata = agent-stats-metadata
    
  5. Start the OpenSearch service:

    sudo systemctl start opensearch.service
    
  6. Send a test request:

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

{% endcomment %}

List installed plugins

To check your installed plugins:

sudo bin/opensearch-plugin list

Remove plugins

If you are removing Performance Analyzer, see below. Otherwise, you can remove the plugin with a single command:

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

Then restart OpenSearch on the node:

sudo systemctl restart opensearch.service

Update plugins

OpenSearch doesn't update plugins. Instead, you have to remove and reinstall them:

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