66Before upgrading Logstash:
77
88* Consult the <<breaking-changes,breaking changes>> docs.
9+ * Read the <<releasenotes>>.
910* Test upgrades in a development environment before upgrading your production cluster.
1011
1112While upgrading Logstash:
@@ -16,29 +17,28 @@ and becomes a new node in the monitoring data.
1617===========================================
1718
1819If you're upgrading other products in the stack, also read the
19- {stack-ref}/index.html[Elastic Stack Installation and Upgrade Guide]. Want an
20- upgrade list that's tailored to your stack? Try out our
21- {upgrade_guide}[Interactive Upgrade Guide].
20+ {stack-ref}/index.html[Elastic Stack Installation and Upgrade Guide].
2221
2322See the following topics for information about upgrading Logstash:
2423
2524* <<upgrading-using-package-managers>>
2625* <<upgrading-using-direct-download>>
26+ * <<upgrading-minor-versions>>
27+ * <<upgrading-logstash-7.0>>
2728* <<upgrading-logstash-pqs>>
28- * <<upgrading-logstash-5.0>>
2929
3030[[upgrading-using-package-managers]]
3131=== Upgrading Using Package Managers
3232
3333This procedure uses <<package-repositories,package managers>> to upgrade Logstash.
3434
35351. Shut down your Logstash pipeline, including any inputs that send events to Logstash.
36- 2. Using the directions in the _Package Repositories_ section, update your repository links to point to the 5.x repositories
37- instead of the previous version .
36+ 2. Using the directions in the <<package-repositories>> section, update your repository
37+ links to point to the 7.x repositories .
38383. Run the `apt-get upgrade logstash` or `yum update logstash` command as appropriate for your operating system.
39394. Test your configuration file with the `logstash --config.test_and_exit -f <configuration-file>` command. Configuration options for
40- some Logstash plugins have changed in the 5 .x release.
41- 5. Restart your Logstash pipeline after updating your configuration file.
40+ some Logstash plugins have changed in the 7 .x release.
41+ 5. Restart your Logstash pipeline after you have updated your configuration file.
4242
4343[[upgrading-using-direct-download]]
4444=== Upgrading Using a Direct Download
@@ -48,12 +48,70 @@ This procedure downloads the relevant Logstash binaries directly from Elastic.
48481. Shut down your Logstash pipeline, including any inputs that send events to Logstash.
49492. Download the https://www.elastic.co/downloads/logstash[Logstash installation file] that matches your host environment.
50503. Unpack the installation file into your Logstash directory.
51- 4. Test your configuration file with the `logstash --config.test_and_exit -f <configuration-file>` command. Configuration options for
52- some Logstash plugins have changed in the 5.x release.
51+ 4. Test your configuration file with the `logstash --config.test_and_exit -f <configuration-file>` command.
52+ Configuration options for
53+ some Logstash plugins have changed in the 7.x release.
53545. Restart your Logstash pipeline after updating your configuration file.
5455
56+
57+
58+ [[upgrading-minor-versions]]
59+ === Upgrading between minor versions
60+
61+ As a general rule, you can upgrade between minor versions (for example, 7.x to
62+ 7.y, where x < y) by simply installing the new release and restarting {ls}.
63+ {ls} typically maintains backwards compatibility for configuration
64+ settings and exported fields. Please review the
65+ <<releasenotes,release notes>> for potential exceptions.
66+
67+ Upgrading between non-consecutive major versions (5.x to 7.x, for example) is not
68+ supported.
69+
5570[[upgrading-logstash-pqs]]
56- === Upgrading with Persistent Queues Enabled
71+ === Upgrading with the Persistent Queue Enabled
72+
73+ If you have the persistent queue (PQ) enabled, please read the section that applies
74+ for your upgrade scenario.
75+
76+ * If you are upgrading from version 6.2.x or earlier, we recommend that you
77+ <<drain-pq,drain the persistent queue>> before you upgrade.
78+
79+ * If you are upgrading from version 6.3.0 or later, see
80+ <<upgrading-logstash-pqs-6.3>> for information.
81+
82+ [float]
83+ [[drain-pq]]
84+ ==== Drain the Persistent Queue (version 6.2.x and earlier)
85+
86+ The following applies only if you are upgrading from Logstash version 6.2.x or
87+ earlier with the persistent queue (PQ) enabled.
88+
89+ We strive to maintain backward compatibility within a given major release.
90+ Serialization issues in Logstash 6.2.x and earlier required us to break
91+ that compatibility in version 6.3.0 to ensure correctness of operation. For more
92+ technical details, please check our tracking github issue for this
93+ matter, https://github.com/elastic/logstash/issues/9494[#9494].
94+
95+ We strongly recommend that you drain or delete
96+ the persistent queue before you upgrade from version 6.2.x and earlier.
97+
98+ To drain the queue:
99+
100+ . In the logstash.yml file, set `queue.drain:true`.
101+ . Restart Logstash for this setting to take effect.
102+ . Shutdown Logstash (using CTRL+C or SIGTERM), and wait for the queue to empty.
103+
104+ When the queue is empty:
105+
106+ . Complete the upgrade.
107+ . Restart Logstash.
108+
109+ We have resolved issues with data incompatibilities for version 6.3 and later.
110+ These steps won’t be required for future upgrades.
111+
112+ [float]
113+ [[upgrading-logstash-pqs-6.3]]
114+ ==== Upgrading from version 6.3 (and later) with Persistent Queues Enabled
57115
58116Upgrading Logstash with persistent queues enabled is supported. The persistent
59117queue directory is self-contained and can be read by a new Logstash instance
@@ -66,37 +124,42 @@ Keep in mind that only one Logstash instance can write to `path.queue`. You
66124cannot have the original instance and the new instance writing to the queue at
67125the same time.
68126
69- [[upgrading-logstash-5 .0]]
70- === Upgrading Logstash to 5 .0
127+ [[upgrading-logstash-7 .0]]
128+ === Upgrading Logstash to 7 .0
71129
72- Before upgrading Logstash, remember to read the <<breaking-changes,breaking changes>>.
130+ Before upgrading Logstash, remember to read the <<breaking-changes,breaking
131+ changes>> docs and the <<releasenotes>>.
73132
74133If you are installing Logstash with other components in the Elastic Stack, also see the
75134{stack-ref}/index.html[Elastic Stack installation and upgrade documentation].
76135
136+ NOTE: Upgrading between non-consecutive major versions (5.x to 7.x, for example) is not
137+ supported. We recommend that you upgrade to 6.x, and then upgrade to 7.x.
138+
77139==== When to Upgrade
78140
79141Fresh installations can and should start with the same version across the Elastic Stack.
80142
81- Elasticsearch 5.0 does not require Logstash 5.0. An Elasticsearch 5.0 cluster will happily receive data from a
82- Logstash 2.x instance via the default HTTP communication layer. This provides some flexibility to decide when to upgrade
83- Logstash relative to an Elasticsearch upgrade. It may or may not be convenient for you to upgrade them together, and it
84- is
85- not required to be done at the same time as long as Elasticsearch is upgraded first.
143+ Elasticsearch 7.0 does not require Logstash 7.0. An Elasticsearch 7.0 cluster
144+ will happily receive data from earlier versions of Logstash via the default
145+ HTTP communication layer. This provides some flexibility to decide when to
146+ upgrade Logstash relative to an Elasticsearch upgrade. It may or may not be
147+ convenient for you to upgrade them together, and it is not required to be done
148+ at the same time as long as Elasticsearch is upgraded first.
86149
87- You should upgrade in a timely manner to get the performance improvements that come with Logstash 5 .0, but do so in
150+ You should upgrade in a timely manner to get the performance improvements that come with Logstash 7 .0, but do so in
88151the way that makes the most sense for your environment.
89152
90153==== When Not to Upgrade
91154
92- If any Logstash plugin that you require is not compatible with Logstash 5 .0, then you should wait until it is ready
155+ If any Logstash plugin that you require is not compatible with Logstash 7 .0, then you should wait until it is ready
93156before upgrading.
94157
95- Although we make great efforts to ensure compatibility, Logstash 5 .0 is not completely backwards compatible. As noted
96- in the Elastic Stack upgrade guide, Logstash 5 .0 should not be upgraded before Elasticsearch 5 .0. This is both
97- practical and because some Logstash 5 .0 plugins may attempt to use features of Elasticsearch 5 .0 that did not exist
98- in earlier versions. For example, if you attempt to send the 5 .x template to a cluster before Elasticsearch 5 .0, then it
99- will not be able to use it and all indexing will fail likely fail. If you use your own, custom template with Logstash,
158+ Although we make great efforts to ensure compatibility, Logstash 7 .0 is not completely backwards compatible. As noted
159+ in the Elastic Stack upgrade guide, Logstash 7 .0 should not be upgraded before Elasticsearch 7 .0. This is both
160+ practical and because some Logstash 7 .0 plugins may attempt to use features of Elasticsearch 7 .0 that did not exist
161+ in earlier versions. For example, if you attempt to send the 7 .x template to a cluster before Elasticsearch 7 .0, then
162+ all indexing will fail likely fail. If you use your own custom template with Logstash,
100163then this issue can be ignored.
101164
102165Note the Elasticsearch Output Index Template change in the <<breaking-changes>> documentation for further insight into
0 commit comments