<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create index using REST API in a clustered environment? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269885#M51817</link>
    <description>&lt;P&gt;Could you symlink system/local to master-apps/_cluster/local instead of copying from one to the other?&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jul 2018 21:05:13 GMT</pubDate>
    <dc:creator>thisissplunk</dc:creator>
    <dc:date>2018-07-25T21:05:13Z</dc:date>
    <item>
      <title>How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269882#M51814</link>
      <description>&lt;P&gt;Can you please tell us, How to create index using REST API in a clustered environment?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 21:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269882#M51814</guid>
      <dc:creator>dhavamanis</dc:creator>
      <dc:date>2016-03-29T21:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269883#M51815</link>
      <description>&lt;P&gt;Hi dhavamanis,&lt;/P&gt;

&lt;P&gt;according to the docs &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/RESTREF/RESTcluster#cluster.2Fmaster.2Findexes"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/RESTREF/RESTcluster#cluster.2Fmaster.2Findexes&lt;/A&gt; a &lt;CODE&gt;POST&lt;/CODE&gt; is not supported, therefore you will not be able to create an index in the cluster directly. &lt;BR /&gt;
But, you can create it on the Cluster Master itself using &lt;CODE&gt;POST&lt;/CODE&gt; on this REST endpoint &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/RESTREF/RESTconf#configs.2Fconf-.7Bfile.7D"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/RESTREF/RESTconf#configs.2Fconf-.7Bfile.7D&lt;/A&gt; using &lt;CODE&gt;indexes.conf&lt;/CODE&gt;. This will create your &lt;CODE&gt;indexes.conf&lt;/CODE&gt; on the Cluster Master in &lt;CODE&gt;$SPLUNK_HOME/etc/system/local/&lt;/CODE&gt; which can be copied over to &lt;CODE&gt;$SPLUNK_HOME/etc/master-apps/_cluster/local&lt;/CODE&gt; on the Cluster Master using a cron job. After the copy the cluster bundle can be applied using this undocumented REST end point:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; curl -k -u admin:changme &lt;A href="https://localhost:8089/services/cluster/master/control/default/apply" target="test_blank"&gt;https://localhost:8089/services/cluster/master/control/default/apply&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is a work around but it will get you there in the end.&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 01:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269883#M51815</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-03-30T01:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269884#M51816</link>
      <description>&lt;P&gt;Is this still the only way to create an index in a cluster with the api? Very disappointed.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 22:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269884#M51816</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2018-06-06T22:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269885#M51817</link>
      <description>&lt;P&gt;Could you symlink system/local to master-apps/_cluster/local instead of copying from one to the other?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 21:05:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269885#M51817</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2018-07-25T21:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269886#M51818</link>
      <description>&lt;P&gt;The question would be here &lt;CODE&gt;should you&lt;/CODE&gt; instead of &lt;CODE&gt;could you&lt;/CODE&gt; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; While technically possible this will for sure not be support you will be on your own when things start to get crazy and you need help from support ....&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 21:07:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269886#M51818</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-07-25T21:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269887#M51819</link>
      <description>&lt;P&gt;Well until Splunk gets off their lazy butts and make the API cover all basic use cases, we'll need a way to not require OS level access for users running automation scripts and this sounded like a solution. The API is pretty weak.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 22:54:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269887#M51819</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2018-07-25T22:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269888#M51820</link>
      <description>&lt;P&gt;So, what prevents you from using your automation script to change &lt;CODE&gt;indexes.conf&lt;/CODE&gt; in &lt;CODE&gt;$SPLUNK_HOME/etc/master_apps/&amp;lt;whatevername&amp;gt;/local/indexes.conf&lt;/CODE&gt; and call the un-documented REST endpoint &lt;CODE&gt;/services/cluster/master/control/default/apply&lt;/CODE&gt; to apply the cluster bundle ?&lt;/P&gt;

&lt;P&gt;here is an example to call the endpoint:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme &lt;A href="https://localhost:8089/services/cluster/master/control/control/apply" target="test_blank"&gt;https://localhost:8089/services/cluster/master/control/control/apply&lt;/A&gt;  -X POST
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 23:08:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269888#M51820</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-07-25T23:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269889#M51821</link>
      <description>&lt;P&gt;Well, the API does not write to master-apps folder at all. You can see that in this answer: &lt;A href="https://answers.splunk.com/answers/387133/how-to-create-index-using-rest-api-in-a-clustered.html"&gt;https://answers.splunk.com/answers/387133/how-to-create-index-using-rest-api-in-a-clustered.html&lt;/A&gt; or try using the /servicesNS/nobody/ endpoint. I'm already using the undocumented bundle push endpoint like you mentioned though.&lt;/P&gt;

&lt;P&gt;We have to use the API because of US vs UK data sensitivity, and well, best practice. We cannot allow certain employees to have OS access at all, hence trying to figure out how to prevent the need for OS accounts doing anything on the master or forwarder, hence symlinks.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 17:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269889#M51821</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2018-07-26T17:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269890#M51822</link>
      <description>&lt;P&gt;Look, in my almost 8 years of providing Splunk PS I came along a lot of things that are not supported by Splunk, but doable &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;BR /&gt;
For example: one customer had its cluster master setup as deployment client to work around this problem; they created the &lt;CODE&gt;indexes.conf&lt;/CODE&gt; on the deployment server using REST calls, the &lt;CODE&gt;indexes.conf&lt;/CODE&gt; was symlinked into a deployment app, which was deployed to the cluster master into &lt;CODE&gt;$SPLUNK_HOME/etc/master-apps/&lt;/CODE&gt; ... it worked. Is it supported, probably not.&lt;/P&gt;

&lt;P&gt;But you can always file an enhancement request with Splunk if you reckon this is a needed feature, use the Support Portal here &lt;A href="https://www.splunk.com/en_us/support-and-services.html"&gt;https://www.splunk.com/en_us/support-and-services.html&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 21:32:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269890#M51822</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-07-26T21:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269891#M51823</link>
      <description>&lt;P&gt;Yes, that is effectively what we are trying to do here, just on the same box. Not sure we want to spin up another box for it. Don't get me wrong, I love working with Splunk, but I am very disappointed at how such an integral part of Splunk administration is not possible with the API.&lt;/P&gt;

&lt;P&gt;Thanks for the help so far and I will look into filing a request.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 21:49:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/269891#M51823</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2018-07-26T21:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create index using REST API in a clustered environment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/584024#M102834</link>
      <description>&lt;P&gt;4 years later....&lt;/P&gt;&lt;P&gt;Have there been any improvements with that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 22:14:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-index-using-REST-API-in-a-clustered-environment/m-p/584024#M102834</guid>
      <dc:creator>Flesz</dc:creator>
      <dc:date>2022-02-07T22:14:58Z</dc:date>
    </item>
  </channel>
</rss>

