Splunk® Enterprise

Admin Manual

Splunk Enterprise version 8.2 is no longer supported as of September 30, 2023. See the Splunk Software Support Policy for details. For information about upgrading to a supported version, see How to upgrade Splunk Enterprise.
This documentation does not apply to the most recent version of Splunk® Enterprise. For documentation on the most recent version, go to the latest release.

Manage licenses from the CLI

This topic describes how to use Splunk Enterprise command line (CLI) to monitor and manage your licenses. It covers some of the common uses and options available for managing licenses. The definitive reference to any CLI command is the command's online help.

For general information on the Splunk CLI, see "About the CLI".

For information on managing licenses through Splunk's REST API, refer to "Licenses" in the REST API Reference Manual.

CLI license commands and objects

You can use the CLI to add, edit, list, and remove licenses and license-related objects. The available commands are:

Command Object(s) Description
add licenses, licenser-pools Add a license or a pool of licenses to a license stack. This command is only available if you have an Enterprise license.
edit licenser-groups, licenser-localslave, licenser-pools Edit the attributes of a license group, peers, or pools of licenses. Some license commands are only available if you have an Enterprise license.
list licenser-groups, licenser-localslave, licenser-messages, licenser-pools, licenser-slaves, licenser-stacks, licenses Depending on the object specified, lists either the attributes of that object or members of that object.
remove licenser-pools, licenses Remove licenses or license pools from a license stack.

License-related objects are:

Object Description
licenser-groups The set of available license groups. This includes Enterprise, Forwarder, and Free.
licenser-localslave A local license slave's configuration.
licenser-messages Any alerts or warnings about the state of your licenses.
licenser-pools The set of license pools.
licenser-slaves All the slaves that have contacted the license master.
licenser-stacks A stack of licenses.
licenses The set of licenses for this Splunk instance.

Common license-related tasks

The following are examples of common license-related tasks that you can perform with the CLI.

Manage licenses

Splunk Enterprise stores applied licenses in the $SPLUNK_HOME/etc/licenses/enterprise/ directory.

To add a new license to the license stack, specify the path to the license file:

splunk add licenses <path_to_license>/<license_name>.xml

To list all the licenses in a license stack:

splunk list licenses

The splunk list command also displays the properties of each license, including the features it enables (features), the license group and stack it belongs to (group_id, stack_id), the indexing quote it allows (quota), and the license key that is unique for each license (license_hash).

If a license expires, you can remove it from the license stack. To remove a license from the license stack, specify the license's hash:

splunk remove licenses BM+S8VetLnQEb1F+5Gwx9rR4M4Y91AkIE=781882C56833F36D

Manage license pools

You can create a license pool from licenses in a license stack (if you have an Enterprise license). A license stack can be divided into multiple license pools. Multiple license slaves can share the quota of the pool.

To see all the license pools in all the license stacks:

splunk list licenser-pools

To add a license pool to the stack, you need to: name the pool, specify the stack that you want to add it to, and specify the indexing volume allocated to that pool:

splunk add licenser-pools pool01 -quota 10mb -slaves guid1,guid2 -stack_id enterprise

You can also specify a description for the pool and the slaves that are members of the pool (these are optional).

You can edit the license pool's description, indexing quota, and slaves. For example, assuming you created pool01 in the previous example:

splunk edit licenser-pools pool01 -description "Test" -quota 15mb -slaves guid3,guid4 -append_slaves true

This adds a description for the pool, "Test", changes the quota from 10mb to 15mb, and adds slaves guid3 and guid4 to the pool. The slaves with guid1 and guid2, which you added in the previous example, continue to have access to the pool.

To remove a license pool from a stack:

splunk remove licenser-pools pool01

Manage license slaves

A license slave accesses license quota from one or more license pools. The license master controls the access .

To list all the license slaves that have contacted the license master:

splunk list licenser-slaves

To list all the properties of the local license slave:

splunk list licenser-localslave

To add a license slave, edit the attributes of that local license slave node (specify the uri of the license master or 'self'):

splunk edit licenser-localslave -master_uri 'https://<master>:<port>'

Monitor license status

You can use the splunk list command to view messages (alerts or warnings) about the state of your licenses.

splunk list licenser-messages

Select a different license group

You can change the license group assigned to a Splunk Enterprise instance. For example:

License group CLI Example
Free splunk edit licenser-groups -name "Free" -is_active "1"
Forwarder splunk edit licenser-groups -name "Forwarder" -is_active "1"
Enterprise splunk edit licenser-groups -name "Enterprise" -is_active "1"

Changing the license group requires a restart of the Splunk Enterprise services.

Choosing the Free or Forwarder license group automatically applies the associated license to the Splunk Enterprise instance. Using a Free or a Forwarder license changes the behavior of your Splunk Enterprise instance, and limits the functionality based upon the restrictions for those license types. To review the license limitations, see Types of Splunk Enterprise licenses.

Authentication is required to switch license groups, except when moving from the Free group.

If you need to reset your administrator account, see Unlock a user account in the Securing the Splunk Platform manual.

Last modified on 14 November, 2022
Swap the license master   About license violations

This documentation applies to the following versions of Splunk® Enterprise: 7.1.0, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.1.6, 7.1.7, 7.1.8, 7.1.9, 7.1.10, 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.2.8, 7.2.9, 7.2.10, 7.3.0, 7.3.1, 7.3.2, 7.3.3, 7.3.4, 7.3.5, 7.3.6, 7.3.7, 7.3.8, 7.3.9, 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, 8.1.0, 8.1.1, 8.1.2, 8.1.3, 8.1.4, 8.1.5, 8.1.6, 8.1.7, 8.1.8, 8.1.9, 8.1.10, 8.1.11, 8.1.12, 8.1.13, 8.1.14, 8.2.0, 8.2.1, 8.2.2, 8.2.3, 8.2.4, 8.2.5, 8.2.6, 8.2.7, 8.2.8, 8.2.9, 8.2.10, 8.2.11, 8.2.12


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