<?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: Deployment: Updating text file for collection script in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55285#M1816</link>
    <description>&lt;P&gt;also have you considered adding a modular input for your script?&lt;/P&gt;</description>
    <pubDate>Wed, 05 Dec 2012 18:33:02 GMT</pubDate>
    <dc:creator>dart</dc:creator>
    <dc:date>2012-12-05T18:33:02Z</dc:date>
    <item>
      <title>Deployment: Updating text file for collection script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55281#M1812</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I just wanted to confirm something...&lt;/P&gt;

&lt;P&gt;I have a deployment set up, where the deployment server maintains list of hosts in a text files, called &lt;CODE&gt;hosts.txt&lt;/CODE&gt;, which differ based on the forwarder. These files and their parent deployment-apps are distributed as expected to the relevant forwarders (based on whitelisting). The &lt;CODE&gt;hosts.txt&lt;/CODE&gt; file are referenced by a python script, which is configured as a scripted input.&lt;/P&gt;

&lt;P&gt;The deployment update/reload process seems to work fine, apart from one aspect, the python script does not seem to read the updates in the file until after a reboot. To expand on this... &lt;/P&gt;

&lt;P&gt;If, for example, I add the line &lt;CODE&gt;1.2.3.4&lt;/CODE&gt; to the &lt;CODE&gt;hosts.txt&lt;/CODE&gt; file in the deployment-app, &lt;CODE&gt;foo&lt;/CODE&gt; (i.e. &lt;CODE&gt;$SPLUNK_HOME/etc/deployment-apps/foo&lt;/CODE&gt;), and reload the deployment (as @dart points out using the &lt;CODE&gt;./splunk reload deploy-server&lt;/CODE&gt; command). I will see the updated list on the forwarder under &lt;CODE&gt;$SPLUNK_HOME/etc/apps/foo&lt;/CODE&gt;, however the script will not "see" the new entry (i.e. "&lt;CODE&gt;1.2.3.4&lt;/CODE&gt;") until I restart Splunk on the forwarder.&lt;/P&gt;

&lt;P&gt;When I had this python script/hosts file combo working on a single server in test, it worked fine. And the script would pick up the update on the next interval cycle. I'm just wondering why I now have to reboot.&lt;/P&gt;

&lt;P&gt;Has anyone any thoughts on this?&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;MHibbin&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 16:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55281#M1812</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-12-05T16:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Deployment: Updating text file for collection script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55282#M1813</link>
      <description>&lt;P&gt;what's the hosts file you're refering to? if it's deploymentclasses.conf, you need to do a splunk reload deploy-server to get the new definitions&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 17:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55282#M1813</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2012-12-05T17:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Deployment: Updating text file for collection script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55283#M1814</link>
      <description>&lt;P&gt;@dart, I re-read my question, and have subsequently updated it (all), so that it makes sense to everyone else, and not just myself. The "hosts file" is a file I use to maintain list of hosts to be used by a scripted input for data collection, which may need to change at various points in the future.. So I use the hosts file to avoid "hard-coding" anything.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 18:29:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55283#M1814</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-12-05T18:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Deployment: Updating text file for collection script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55284#M1815</link>
      <description>&lt;P&gt;Do you have restartSplunkd set to true?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 18:32:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55284#M1815</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2012-12-05T18:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Deployment: Updating text file for collection script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55285#M1816</link>
      <description>&lt;P&gt;also have you considered adding a modular input for your script?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 18:33:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55285#M1816</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2012-12-05T18:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Deployment: Updating text file for collection script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55286#M1817</link>
      <description>&lt;P&gt;I have used &lt;CODE&gt;restartSplunkd&lt;/CODE&gt; since I noticed the scripted input wasn't picking up the change, and it does work, however I was just curious if there was something I should be looking out for. I haven't really looked into modular inputs (or splunk 5) as the time left for this particular project is running out very soon.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 21:21:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55286#M1817</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-12-05T21:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Deployment: Updating text file for collection script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55287#M1818</link>
      <description>&lt;P&gt;Okay so my work around to avoid restarting Splunk each time a new host is added was to write the updates to a seperate deployment-app.. So two apps get sent out, one containing the collection script, one containing the the hosts file. This appears to work without requiring a restart.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2012 21:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Deployment-Updating-text-file-for-collection-script/m-p/55287#M1818</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-12-12T21:40:41Z</dc:date>
    </item>
  </channel>
</rss>

