Choose your Splunk Enterprise upgrade path for the Python 3 migration
Splunk Enterprise administrators must plan the upgrade to Splunk Enterprise version 8.0 to account for the additional steps required due to the Python 2.7 end of life.
This page applies only to Splunk Enterprise. If you are a Splunk Cloud administrator, work with Splunk Support to plan your upgrade.
In Splunk Enterprise version 8.0, Splunk Enterprise continues to use the Python 2 interpreter globally by default, but Splunk Web supports only Python 3.7. Scripts and templates that depend on Splunk Web must be adjusted to use Python 3-compatible syntax before the upgrade, but you have several options for how and when you adjust Python scripts that aren't dependent on Splunk Web.
For these files that aren't dependent on Splunk Web, Splunk Enterprise 8.0 offers per-file Python version switches in the configuration files to allow you to upgrade to Python 3 at a pace that meets your organizational requirements. In addition, a global switch allows you to modify the default Python version or force the use of Python 3.
Depending on your organization's requirements, you might choose to upgrade to Python 3 as comprehensively as possible as you upgrade to version 8.0 of Splunk Enterprise, using dual-compatible Python code or by rewriting Python scripts to be compatible only with Python 3. Or, you might choose to upgrade to version 8.0 without immediately performing the Python 3 migration, focusing on the breaking changes for the release.
Use the following table to choose the upgrade path that is best for you. If you use private, in-house apps, you have more choices about the time and method by which you upgrade. If you use Splunkbase apps, you are constrained by the choices of the app developer regarding compatibility with Python 2 and Python 3.
Statement that best describes you | Overall effort | Instructions |
---|---|---|
I want to use the Python 3 runtime as soon as possible, and I don't mind using code that is dual-compatible with Python 2 and 3. | Recommended. Lowest overall effort. | Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts |
I want to upgrade with minimal work, regardless of Python version. | Low effort in the short term, high effort in the long term. |
Upgrade using the Python 2 runtime and make minimal changes to Python code |
If you aren't sure which statement best applies to you, the best practice is to Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts.
Migrate a Splunk Enterprise instance from one physical machine to another | Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts |
This documentation applies to the following versions of Splunk® Enterprise: 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.5, 8.0.6, 8.0.7, 8.0.8, 8.0.9, 8.0.10
Feedback submitted, thanks!