7.9 KiB
layout | title | parent | nav_order |
---|---|---|---|
default | OpenSearch plugin install | Install and configure | 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
- TOC {:toc}
Plugin compatibility
OpenSearch version | Plugin versions |
---|---|
1.0.0-beta1 |
opensearch-alerting 1.13.1.0 opensearch-anomaly-detection 1.13.0.0 opensearch-asynchronous-search 1.13.0.1 opensearch-index-management 1.13.2.0 opensearch-job-scheduler 1.13.0.0 opensearch-knn 1.13.0.0 opensearch-performance-analyzer 1.13.0.0 opensearch-reports-scheduler 1.13.0.0 opensearch-sql 1.13.2.0 opensearch_security 1.13.1.0 |
To install plugins manually, you must have the exact OSS version of OpenSearch installed (for example, 6.6.2 and not 6.6.1). 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
Asynchronous search
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:
-
Create
/usr/lib/systemd/system/opensearch-performance-analyzer.service
based on this file. -
Make the CLI executable:
sudo chmod +x /usr/share/opensearch/bin/performance-analyzer-agent-cli
-
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
-
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 to0.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
-
Start the OpenSearch service:
sudo systemctl start opensearch.service
-
Send a test request:
curl -XGET "localhost:9600/_opensearch/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all"
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>