How to install Logstash plugins offline?
To achieve offline installation of Logstash plugins, follow the following steps:
- Download the required plugin file on a machine in a connected environment. You can download the plugin file by executing the following command in the command line.
bin/logstash-plugin prepare-offline-pack PLUGIN_NAME
Among them, PLUGIN_NAME is the name of the plugin to be downloaded.
- Transfer the downloaded plugin files to the target machine by using methods such as a USB flash drive or FTP to copy the files from the online machine to the offline machine.
- Place the plugin files in the “plugins/offline” folder in the installation directory of Logstash on the offline machine.
- Run the following command to install the offline plugin.
bin/logstash-plugin install --no-verify --offline PLUGIN_NAME
Here, PLUGIN_NAME is the name of the plugin.
- Once installation is complete, start logstash and the plugins will be loaded and available.
Note:
- When installing plugins offline, make sure that the plugin file version is compatible with the version of Logstash.
- The plugin files need to be located in the correct path on the offline machine in order for logstash to recognize and load them.
- In some cases, offline installed plugins may have dependencies that require manual downloading and installation of the necessary dependencies.