Upgrading with the Persistent Queue Enabled

If you have the persistent queue (PQ) enabled, please read the section that appliesfor your upgrade scenario.

Drain the Persistent Queue (version 6.2.x and earlier)

The following applies only if you are upgrading from Logstash version 6.2.x orearlier with the persistent queue (PQ) enabled.

We strive to maintain backward compatibility within a given major release.Serialization issues in Logstash 6.2.x and earlier required us to breakthat compatibility in version 6.3.0 to ensure correctness of operation. For moretechnical details, please check our tracking github issue for thismatter, #9494.

We strongly recommend that you drain or deletethe persistent queue before you upgrade from version 6.2.x and earlier.

To drain the queue:

  1. In the logstash.yml file, set queue.drain:true.
  2. Restart Logstash for this setting to take effect.
  3. Shutdown Logstash (using CTRL+C or SIGTERM), and wait for the queue to empty.

When the queue is empty:

  1. Complete the upgrade.
  2. Restart Logstash.

We have resolved issues with data incompatibilities for version 6.3 and later.These steps won’t be required for future upgrades.

Upgrading from version 6.3 (and later) with Persistent Queues Enabled

Upgrading Logstash with persistent queues enabled is supported. The persistentqueue directory is self-contained and can be read by a new Logstash instancerunning the same pipeline. You can safely shut down the original Logstashinstance, spin up a new instance, and set path.queue in the logstash.ymlsettings file to point to the original queue directory.You can also use a mounted drive to make this workflow easier.

Keep in mind that only one Logstash instance can write to path.queue. Youcannot have the original instance and the new instance writing to the queue atthe same time.