I tried running this command, but no slave gets added in server.conf.
/opt/splunk/bin/splunk add licenser-pools poolname -quota 10gb -slaves slave1,slave2 -stackid enterprise
The below pool stanza gets added without slave servers:
[lmpool:pool_name] quota = 10gb stack_id = enterprise.
When I add the indexers in the pool from the console, I see something like this below:
[lmpool:test] quota = 2147483648 slaves = C95CC0BB-CFEA-4D2A-A1A9-0FB12382FSCW,6386358F-1564-4F46-A961-35875BFB58F8 stack_id = enterprise
Also, how do I directly edit server.conf? How does this value generating exactly ? slaves = C95CC0BB-CFEA-4D2A-A1A9-0FB12382FSCW ---- this is server name , but not sure what it means to Splunk.
How do I get these added via CLI or updating server.conf ?
To add license pool on license master have a look at below splunk docs it will guide via web or via cli:-
via web- https://docs.splunk.com/Documentation/Splunk/7.2.0/Admin/Createalicensepool
via cli- https://docs.splunk.com/Documentation/Splunk/7.2.0/Admin/LicenserCLIcommands
You need to provide Server (slave) GUID in below command, ref. doc https://docs.splunk.com/Documentation/Splunk/7.2.0/Admin/LicenserCLIcommands#Managing_license_pools
$SPLUNK_HOME/bin/splunk add licenser-pools pool01 -quota 10mb -slaves guid1,guid2 -stack_id enterprise
If you want to modify existing pool then you need to use below command
$SPLUNK_HOME/bin/splunk edit licenser-pools pool01 -description "Test" -quota 15mb -slaves guid3,guid4 -append_slaves true
Now the question is from where you will able to find GUID of each slave ? For this you need to check
$SPLUNK_HOME/etc/instance.cfg file on each slave.
If you want to modify server.conf directly then you can do below configuration for every pool but when you modify server.conf directly you need to restart splunk on license master to take configuration into effect.
[lmpool:POOL_NAME] description = ANY_DESCRIPTION quota = POOL_SIZE_IN_MB slaves = SLAVE_1_GUID, SLAVE_2_GUID, ..... , SLAVE_N_GUID stack_id = enterprise
@harsmarvania57 : can I get the list of all the GUID on license master ( list of all the servers who are reporting to license master )
I dont want to login to each server are get their guid, as this is not possible to automate
You may try this REST API http://docs.splunk.com/Documentation/Splunk/7.2.0/RESTREF/RESTlicense#licenser.2Fslaves for automation but I am not 100% sure whether it will display all Slaves or only those are added into license pools.