<?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 do I programmatically edit conf files in the deployment-apps directory in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53738#M22295</link>
    <description>&lt;P&gt;We took a more direct and simpler (for our needs) approach and are using a python script in conjunction with the ConfigParser package to edit the files directly in the .../etc/deployment-apps/... directories.  Appreciate all of the interesting suggestions!&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2012 17:08:05 GMT</pubDate>
    <dc:creator>beaumaris</dc:creator>
    <dc:date>2012-01-23T17:08:05Z</dc:date>
    <item>
      <title>How do I programmatically edit conf files in the deployment-apps directory</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53733#M22290</link>
      <description>&lt;P&gt;We are on Splunk 4.2.1 and using deployment server to manage our apps.  We'd like to create an app to manage the settings in some of the *.conf files in the .../etc/deployment-apps directories, so users don't have to know linux editors or the subtleties of the parameters in the configuration files.  What's the recommended way for programmatically editing a conf file on disk?  We could use python libraries or other workarounds, but we're hoping there is experience others can share with doing this.&lt;/P&gt;

&lt;P&gt;To help clarify, from the Splunk Manager app and the CLI you can do things such as 'add search-server', which updates a distsearch.conf file.  However this typically updates files local to the machine hosting the UI, and in the .../etc/system directory tree.  We are looking for similar capability but with the edits going to a conf file (distsearch.conf in this example) in .../etc/deployment-apps directory tree.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 19:43:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53733#M22290</guid>
      <dc:creator>beaumaris</dc:creator>
      <dc:date>2012-01-18T19:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I programmatically edit conf files in the deployment-apps directory</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53734#M22291</link>
      <description>&lt;P&gt;No, most of the app framework tools used to interact with configuration file objects only deal with objects in $SPLUNK_HOME/etc/(users|apps).  At a higher level, there seems to be some interest in a UI for the Deployment Server, which is something I have been planning for a while.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 20:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53734#M22291</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2012-01-18T20:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I programmatically edit conf files in the deployment-apps directory</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53735#M22292</link>
      <description>&lt;P&gt;Thanks for the confirmation that it's not a native feature (yet).  Any suggestions on how we might workaround it now?  If we get a hint on how Splunk makes the changes to the $SPLUNK_HOME/etc/(users|apps) files then we might be able to apply the same technique ourselves but to different files.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 21:04:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53735#M22292</guid>
      <dc:creator>beaumaris</dc:creator>
      <dc:date>2012-01-18T21:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I programmatically edit conf files in the deployment-apps directory</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53736#M22293</link>
      <description>&lt;P&gt;Not really any good suggestions to give at the moment, as most conf files are manipulated through the REST API (C++), which in turn writes the conf files.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2012 21:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53736#M22293</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2012-01-18T21:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I programmatically edit conf files in the deployment-apps directory</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53737#M22294</link>
      <description>&lt;P&gt;I have a suggestion.  This is a kludge, but I think it will work. I am concerned about things that would normally be part of $SPLUNK_HOME/etc/system, but depending on your needs, that may not be an issue.  Here is my idea:&lt;/P&gt;

&lt;P&gt;Create a Splunk instance somewhere.  It can be a free copy of Splunk, but I would recommend adding it as a slave to your master license server.  This copy of Splunk will do &lt;EM&gt;no&lt;/EM&gt; indexing.  It will be independent of all other Splunk instances (except for getting its license).&lt;/P&gt;

&lt;P&gt;Create $SPLUNK_HOME/etc/system/local/indexes.conf, with the following lines:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[main]
disabled=true
[summary]
disabled=true
[history]
disabled=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you create indexes in any of your apps, add a similar line to this file for each index you create.  This will keep Splunk from actually indexing anything.  This probably isn't necessary, but I am concerned about any inputs that might be part of the apps.&lt;/P&gt;

&lt;P&gt;On this special server, make a copy of all the deployment-apps - but put them in the regular apps directory instead.&lt;/P&gt;

&lt;P&gt;Now you can edit them using the UI.&lt;/P&gt;

&lt;P&gt;Finally, you will probably want to create a script that copies &lt;CODE&gt;$SPLUNK_HOME/etc/apps&lt;/CODE&gt;from this system to &lt;CODE&gt;$SPLUNK_HOME/etc/deployment-apps&lt;/CODE&gt; on the real deployment server. You will need to notify the deployment server that you have changed the files, too.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2012 20:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53737#M22294</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-01-21T20:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I programmatically edit conf files in the deployment-apps directory</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53738#M22295</link>
      <description>&lt;P&gt;We took a more direct and simpler (for our needs) approach and are using a python script in conjunction with the ConfigParser package to edit the files directly in the .../etc/deployment-apps/... directories.  Appreciate all of the interesting suggestions!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2012 17:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-programmatically-edit-conf-files-in-the-deployment-apps/m-p/53738#M22295</guid>
      <dc:creator>beaumaris</dc:creator>
      <dc:date>2012-01-23T17:08:05Z</dc:date>
    </item>
  </channel>
</rss>

