Team,
We are managing License Manager for enterprise wide, so we need to know
1) How we can get the list of license pools along with GUID
2) Where do we see these data in server? which logs
3) We are in a process of automation, where we need to add indexers to particular license pools, how we can achieve this?
Sorry, I was on a few busy weeks couldn't get a response to you. If you still didn't get it working a few things that will help you via the Splunk CLI (log on to the SSH/RDP on the Splunk License Server and run those commands as the Splunk user):
To list the license slaves (Indexers/Search Heads etc) reporting to the license server:
/opt/splunk/bin/splunk list licenser-slaves
This will show up the GUID, of each Slave reporting to the license server along with the instance name (under label
)
Example:
[splunk@deploysrv ~]$ /opt/splunk/bin/splunk list licenser-slaves
8052D46A-D7F8-49DB-9BA3-828C7FE87DBC
active_pool_ids:
auto_generated_pool_enterprise
label:idx02.local
pool_ids:
auto_generated_pool_enterprise
auto_generated_pool_forwarder
auto_generated_pool_free
stack_ids:
enterprise
forwarder
free
warning_count:0
D79A9D7B-4DE3-497A-80BD-90FEF14971C0
active_pool_ids:
10gb_test_pool
label:deploysrv.local
pool_ids:
10gb_test_pool
auto_generated_pool_forwarder
auto_generated_pool_free
stack_ids:
enterprise
forwarder
free
warning_count:0
EBF81948-E2DB-49F5-B4FF-CB90129C7A94
active_pool_ids:
auto_generated_pool_enterprise
label:idx01.local
pool_ids:
auto_generated_pool_enterprise
auto_generated_pool_forwarder
auto_generated_pool_free
stack_ids:
enterprise
forwarder
free
warning_count:0
Now that you have the GUID, you can can add a new license pool:
/opt/splunk/bin/splunk add licenser-pools <poolname> -quota <quota> -slaves <guids> -stack_id enterprise
Example command: /opt/splunk/bin/splunk add licenser-pools 20gb_pool -quota 20gb -slaves 8052D46A-D7F8-49DB-9BA3-828C7FE87DBC -stack_id enterprise
You can also edit a current license pool to add a new indexer:
/opt/splunk/bin/splunk edit licenser-pools <pool_name> -slaves <slave_guid> -append_slaves true
Example: /opt/splunk/bin/splunk edit licenser-pools 20gb_pool -slaves EBF81948-E2DB-49F5-B4FF-CB90129C7A94 -append_slaves true
All is documented here: https://docs.splunk.com/Documentation/Splunk/8.0.0/Admin/LicenserCLIcommands
same rest command i am using but still not working. Can someone help me with the same?
Do we need to run the rest command to get license pool/GUID details from the license manager server? and if so, what path?
I am getting an error stating "-bash: rest: command not found".
Please let me know
Hey, the rest command is on the Splunk SPL
Rest command that is present on SPL is the same one which I ran.
Thanks for the response.
Do you have any sample CLI?
I was trying to use below curl but did not get expected results
curl -k -u username: password (license_manager_server:port)/services/licenser/pools
In order to add indexers to the particular license pools we need to use GUID, how do I get that GUID at license pools level?
Thanks for the reply.
We have so many License pools, so we need to use some script to add new indexers to different License pools. How can we achieve this?
Does the GUID will be static for license pools?
Hi, See below:
| rest splunk_server=<your_license_master_instance> /services/licenser/pools
To get the GUIDs:
| rest splunk_server=<your_license_master_instance> /services/licenser/licenses
index=_internal source=*license_usage.log*
. You can also play with the License Report Feature from Splunk, on the license master: Settings
> Licensing
> Usage report
Settings
> Licensing
> Add pool
, give it a name, description and you can choose the license allocation there and what indexers will be connected to that poolIf you're looking for automation the best way to go is probably to use the CLI. See this docs for a number of CLI commands that will help you add/edit etc a license-pool or license: https://docs.splunk.com/Documentation/Splunk/8.0.0/Admin/LicenserCLIcommands. GUIDs are related to licenses and you don't assign a license to a pool, you assign a capacity from the full available license so it won't matter anyway what GUID you want to use. For example if you have 5 100GB licenses you can create a pool with 50Gb, another with 300Gb and another with 150Gb.
Hope this helps, if yes just mark it as resolved 🙂