Skip to main content

Plugin Management

Plugin management is performed using the following utilities:

  • opensearch-plugin
  • opensearch-dashboards-plugin
  • logstash-plugin

Listing Plugins

OpenSearch

To list OpenSearch plugins, use the following command:

$OPENSEARCH_HOME/bin/opensearch-plugin list

OpenSearch Dashboards

To list OpenSearch Dashboards plugins, use the following command:

$OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-plugin list
warning

When running the command as the root user, the --allow-root flag is required. Example:

$OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-plugin list --allow-root

Logstash

To list Logstash plugins, use the following command:

$LOGSTASH_HOME/bin/logstash-plugin list

Installing Plugins

Use the install command to install plugins. After executing the command, a service restart is required.

OpenSearch

To install an OpenSearch plugin, use the following command:

$OPENSEARCH_HOME/bin/opensearch-plugin install file://<absolute path to archive>
systemctl restart opensearch

Some plugins require extended privileges beyond those provided by default in OpenSearch core. These plugins will automatically list the required privileges and prompt the user for confirmation before proceeding with installation. When executing the plugin installation script from another program, the plugin script itself should automatically detect that it is not being invoked from the console and bypass the confirmation prompt, granting all requested permissions without user interaction.

To forcibly enable batch mode, specify -b or --batch as follows:

$OPENSEARCH_HOME/bin/opensearch-plugin install file://<absolute path to archive> --batch

OpenSearch Dashboards

To install an OpenSearch Dashboards plugin, use the following command:

$OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-plugin install file://<absolute path to archive>
systemctl restart opensearch-dashboards
warning

When running the command as the root user, the --allow-root flag is required. Example:

$OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-plugin install file://<absolute path to archive> --allow-root

Note that the plugin files will be owned by the root user after installation. Adjust file permissions before proceeding.

danger

When installing or updating a plugin, it is necessary to increment the build.number parameter in the following file:

$OPENSEARCH_DASHBOARDS_HOME/package.json

This is required to clear the browser cache. If this step is skipped, changes to the user interface may not be applied.

Example of changing the parameter:

...
"build": {
- "number": 6870
+ "number": 6871
}
...

Restart the service.

Logstash

Use the following file formats:

  • gem
  • zip

To install a plugin, use the following command:

$LOGSTASH_HOME/bin/logstash-plugin install file://<path to plugin>
systemctl restart logstash

Removing Plugins

Use the remove command to remove an installed plugin. After executing the command, a service restart is required.

OpenSearch

To remove an OpenSearch plugin, use the following command:

$OPENSEARCH_HOME/bin/opensearch-plugin remove <plugin name>
systemctl restart opensearch

OpenSearch Dashboards

To remove an OpenSearch Dashboards plugin, use the following command:

$OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-plugin remove <plugin name>
systemctl restart opensearch-dashboards
warning

When running the command as the root user, the --allow-root flag is required. Example:

$OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-plugin remove <plugin name> --allow-root
danger

When removing a plugin, it is necessary to increment the build.number parameter in the following file:

$OPENSEARCH_DASHBOARDS_HOME/package.json

This is required to clear the browser cache. If this step is skipped, changes to the user interface may not be applied.

Example of changing the parameter:

...
"build": {
- "number": 6870
+ "number": 6871
}
...

Restart the service.

Logstash

To remove a Logstash plugin, use the following command:

$LOGSTASH_HOME/bin/logstash-plugin remove <plugin name>
systemctl restart logstash