Splunk® Enterprise

Python 3 Migration

Python 3 migration with ITSI

This page helps identify prerequisites, required changes, and steps for migrating IT Service Intelligence (ITSI) to Python 3.7 alongside your Splunk Enterprise deployment. This topic covers the following upgrade scenarios:

  • Migrating ITSI and Splunk Enterprise to Python 3.7
  • Upgrading to Splunk Enterprise version 8.x with Python 2
  • Upgrading to ITSI 4.4.x or higher without upgrading to Splunk Enterprise version 8.x

ITSI version 4.19 and higher is compatible with Python 3.9.

Scenario 1: Migrate ITSI and Splunk Enterprise to Python 3

You must upgrade ITSI and all other associated add-ons to the newest versions before upgrading to Splunk Enterprise version 8.x. If you upgrade Splunk Enterprise first, ITSI breaks.

In order to upgrade to Splunk Enterprise 8.x, you must also upgrade to ITSI version 4.4.x or higher. All ITSI versions prior to 4.4.x are incompatible with Splunk Enterprise version 8.x, even if you use the Python 2.7 runtime. For more information about ITSI compatibility with Splunk Enterprise, see the Splunk products version compatibility matrix.

The only post-upgrade impact for Python 3 migration relates to ITSI Predictive Analytics customers. If you currently leverage ITSI's Predictive Analytics capabilities, you must retrain all of your predictive models after you migrate ITSI to Python 3. For information about Predictive Analytics, see Overview of Predictive Analytics in ITSI.

Perform the following steps in this order to migrate ITSI to Python 3. Some steps are only required if you're using Predictive Analytics.

1. Upgrade to ITSI version 4.4.x or higher

For more information, see Upgrade IT Service Intelligence on a single instance or Upgrade IT Service Intelligence in a search head cluster environment depending on your deployment architecture.

2. Upgrade the Machine Learning Toolkit

If you're using Predictive Analytics, upgrade your MLTK to version 5.0.0 or later. For ITSI version compatibility with the MLTK, see ITSI compatibility with other apps and add-ons.

3. Upgrade required add-ons

If you have an integration with ServiceNow and/or leverage ITSI's bidirectional ticketing functionality, you must upgrade the Splunk Add-on for ServiceNow and the Common Information Model (CIM) to the newest releases which are Python 3 compatible.

For ITSI version compatibility with these add-ons, see ITSI compatibility with other apps and add-ons.

4. Upgrade Splunk Enterprise using the Python 3 runtime

Upgrade your Splunk Enterprise instance to version 8.x and perform the Python 3 migration. For more information, see Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts in the Splunk Enterprise Installation Manual.

In distributed environments, always run the same Python version on both indexers and search heads.

5. Retrain Predictive Analytics models

If you're using Predictive Analytics, confirm that data ingested to train any predictive models is still stored in Splunk software. If data has exceeded retention timeframes, re-ingest the data to feed the models.

Retrain all predictive models saved into each of your services. Retraining a model automatically replaces the existing model. For instructions, see Retrain a predictive model in ITSI.

Scenario 2: Upgrade to Splunk Enterprise 8.x with Python 2

If you upgrade to Splunk Enterprise version 8.x but want to use the Python 2 runtime, you still need to upgrade ITSI to version 4.4.x or higher. However, you must use a pre-5.0.0 version of the Machine Learning toolkit.

1. Upgrade Splunk Enterprise using the Python 2 runtime

Upgrade your Splunk Enterprise instance to version 8.x using the Python 2 runtime. For more information, see Upgrade using the Python 2 runtime and make minimal changes to Python code in the Splunk Enterprise Installation Manual.

2. Upgrade to ITSI version 4.4.x or higher

For more information, see Upgrade IT Service Intelligence on a single instance or Upgrade IT Service Intelligence in a search head cluster environment depending on your deployment architecture.

3. (Optional) Upgrade required add-ons

The Splunk Add-on for ServiceNow and the Common Information Model (CIM) can remain on older versions, or you can upgrade them if needed. For ITSI compatibility with these add-ons, see ITSI compatibility with other apps and add-ons.

Scenario 3: Upgrade to ITSI 4.4.x or higher without Splunk Enterprise 8.x

ITSI version 4.4.x and higher supports both the Python 2.7 and Python 3.7 runtimes. Therefore, you can upgrade to ITSI 4.4.x or higher while still remaining on Splunk Enterprise versions 7.2.x - 7.3.x. For ITSI compatibility with Splunk Enterprise, see Splunk Enterprise system requirements.

The Splunk Add-on for ServiceNow and the Common Information Model (CIM) can remain on older versions, or you can upgrade them if needed. For ITSI compatibility with these add-ons, see ITSI compatibility with other apps and add-ons.

Do not upgrade the Machine Learning Toolkit to version 5.0.0. Version 5.0.0 is only compatible with Python 3.

Upon startup, you might encounter errors stating you have an invalid Python version. You can ignore these warnings as they have no impact on functionality. Once you upgrade to Splunk Enterprise version 8.0.0 or later the warnings no longer appear.

Last modified on 20 May, 2024
Python with Splunk Enterprise Security   Update Splunk MLTK models for Python 3

This documentation applies to the following versions of Splunk® Enterprise: 9.1.6, 9.1.7, 9.3.0, 9.3.1, 9.3.2, 9.4.0


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters