Offline Plugin Managementedit

The Logstash plugin manager provides support for preparing offline plugin packs that you can use to install Logstash plugins on systems that don’t have Internet access.

This procedure requires a staging machine running Logstash that has access to a public or private Rubygems server. The staging machine downloads and packages all the files and dependencies required for offline installation.

Note

If you used offline plugin management prior to Logstash 5.2, you used the pack and unpack subcommands. Those subcommands are now deprecated, but the procedure for using them is still available in the documentation here.

Building Offline Plugin Packsedit

An offline plugin pack is a compressed file that contains all the plugins your offline Logstash installation requires, along with the dependencies for those plugins.

To build an offline plugin pack:

  1. Make sure all the plugins that you want to package are installed on the staging server and that the staging server can access the Internet.
  2. Run the bin/logstash-plugin prepare-offline-pack subcommand to package the plugins and dependencies:

    bin/logstash-plugin prepare-offline-pack --output OUTPUT [PLUGINS]

    where:

    • OUTPUT specifies the location where the compressed plugin pack will be written. The default location is /LOGSTASH_HOME/logstash-offline-plugins-5.2.1.zip.
    • [PLUGINS] specifies one or more plugins that you want to include in the pack.

Examples:

bin/logstash-plugin prepare-offline-pack logstash-input-beats 
bin/logstash-plugin prepare-offline-pack logstash-filter-* 
bin/logstash-plugin prepare-offline-pack logstash-filter-* logstash-input-beats 

Packages the Beats input plugin and any dependencies.

Uses a wildcard to package all filter plugins and any dependencies.

Packages all filter plugins, the Beats input plugin, and any dependencies.

Note

Downloading all dependencies for the specified plugins may take some time, depending on the plugins listed.

Installing Offline Plugin Packsedit

To install an offline plugin pack:

  1. Move the compressed bundle to the machine where you want to install the plugins.
  2. Run the bin/logstash-plugin install subcommand to install the packaged plugins:

    bin/logstash-plugin install file:///path/to/logstash-offline-plugins-5.2.1.zip

    Where path/to/logstash-offline-plugins-5.2.1.zip is the path to the offline plugin pack.

Updating Offline Pluginsedit

To update offline plugins, you update the plugins on the staging server and then use the same process that you followed to build and install the plugin pack:

  1. On the staging server, run the bin/logstash-plugin update subcommand to update the plugins. See the section called “Updating pluginsedit”.
  2. Create a new version of the plugin pack. See the section called “Building Offline Plugin Packsedit”.
  3. Install the new version of the plugin pack. See the section called “Installing Offline Plugin Packsedit”.

Building the Offline Package (Deprecated Procedure)edit

Warning

Deprecated in 5.2.

Starting with Logstash 5.2, the pack and unpack commands are deprecated and replaced by the prepare-offline-pack and install commands

Working with offline plugins requires you to create an offline package, which is a compressed file that contains all of the plugins your offline Logstash installation requires, along with the dependencies for those plugins.

  1. Create the offline package with the bin/logstash-plugin pack subcommand.

    When you run the bin/logstash-plugin pack subcommand, Logstash creates a compressed bundle that contains all of the currently installed plugins and the dependencies for those plugins. By default, the compressed bundle is a GZipped TAR file when you run the bin/logstash-plugin pack subcommand on a UNIX machine. By default, when you run the bin/logstash-plugin pack subcommand on a Windows machine, the compressed bundle is a ZIP file. See Managing Plugin Packs for details on changing these default behaviors.

    Note

    Downloading all dependencies for the specified plugins may take some time, depending on the plugins listed.

  2. Move the compressed bundle to the offline machines that are the source for offline plugin installation, then use the bin/logstash-plugin unpack subcommand to make the packaged plugins available.

Install or Update a local plugin (Deprecated Procedure)edit

Warning

Deprecated in 5.2.

To install or update a local plugin, use the --local option with the install and update commands, as in the following examples:

Example 1. Installing a local plugin

bin/logstash-plugin install --local logstash-input-jdbc


Example 2. Updating a local plugin

bin/logstash-plugin update --local logstash-input-jdbc


Example 3. Updating all local plugins in one command

bin/logstash-plugin update --local


Managing Plugin Packsedit

Warning

Deprecated in 5.2.

The pack and unpack subcommands for bin/logstash-plugin take the following options:

--tgz

Generate the offline package as a GZipped TAR file. The default behavior on UNIX systems.

--zip

Generate the offline package as a ZIP file. The default behavior on Windows systems.

[packname] --override

Generates a new offline package that overwrites an existing offline with the specified name. [packname] --[no-]clean: Deletes offline packages matching the specified name.