<?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 How to configure Splunk to to run my python script every time Splunk starts or restarts? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215500#M2844</link>
    <description>&lt;P&gt;I want to run a python script along with Splunk. It should start when Splunk starts and should restart when Splunk restarts. Is there a way of configuring this so that my python script can run every time Splunk starts?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Sep 2015 10:00:13 GMT</pubDate>
    <dc:creator>SIddharth5794</dc:creator>
    <dc:date>2015-09-07T10:00:13Z</dc:date>
    <item>
      <title>How to configure Splunk to to run my python script every time Splunk starts or restarts?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215500#M2844</link>
      <description>&lt;P&gt;I want to run a python script along with Splunk. It should start when Splunk starts and should restart when Splunk restarts. Is there a way of configuring this so that my python script can run every time Splunk starts?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 10:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215500#M2844</guid>
      <dc:creator>SIddharth5794</dc:creator>
      <dc:date>2015-09-07T10:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to to run my python script every time Splunk starts or restarts?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215501#M2845</link>
      <description>&lt;P&gt;If you're running Splunk on UNIX/Linux, you could edit the startup scripts in /etc/init.d/ to include your script in the start/restart section. Just be careful that if you ever do a "splunk enable boot-start", your changes will get overwritten.&lt;/P&gt;

&lt;P&gt;You can also create a scripted input and set the interval to -1 as per the documentation : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.5/Data/Setupcustominputs"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.5/Data/Setupcustominputs&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;For one-shot data streams, enter -1. Setting interval to -1 will cause the script to run each time the splunk daemon restarts.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Sep 2015 10:16:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215501#M2845</guid>
      <dc:creator>lcrielaa</dc:creator>
      <dc:date>2015-09-07T10:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to to run my python script every time Splunk starts or restarts?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215502#M2846</link>
      <description>&lt;P&gt;I found this in init.d file&lt;/P&gt;

&lt;P&gt;"The init scripts that used to reside in this directory are deprecated.  Splunk&lt;BR /&gt;
now includes the ability to update the system boot configuration on its own."&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 10:44:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215502#M2846</guid>
      <dc:creator>SIddharth5794</dc:creator>
      <dc:date>2015-09-07T10:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to to run my python script every time Splunk starts or restarts?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215503#M2847</link>
      <description>&lt;P&gt;not /opt/splunk/etc/init.d/ but /etc/init.d/ of the actual server.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 10:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215503#M2847</guid>
      <dc:creator>lcrielaa</dc:creator>
      <dc:date>2015-09-07T10:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to to run my python script every time Splunk starts or restarts?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215504#M2848</link>
      <description>&lt;P&gt;I don't want to run the script while splunk is not running. I just want to run it when splunk runs. So the running of the script has to be initiated according to the running of splunk.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 11:13:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215504#M2848</guid>
      <dc:creator>SIddharth5794</dc:creator>
      <dc:date>2015-09-07T11:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to to run my python script every time Splunk starts or restarts?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215505#M2849</link>
      <description>&lt;P&gt;Which exactly what I'm saying.&lt;/P&gt;

&lt;P&gt;Either use the Splunk start/restart script in /etc/init.d/ and hook in your python script there. This will run your script when you start/restart Splunk.&lt;/P&gt;

&lt;P&gt;Or&lt;/P&gt;

&lt;P&gt;Create a scripted input in Splunk and give it an interval of -1 so that it starts every time you start/restart Splunk. I recommend this option. See the documentation link I provided earlier.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 11:18:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215505#M2849</guid>
      <dc:creator>lcrielaa</dc:creator>
      <dc:date>2015-09-07T11:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to to run my python script every time Splunk starts or restarts?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215506#M2850</link>
      <description>&lt;P&gt;Ohh.. Thanks! I will try it out.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 11:23:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-configure-Splunk-to-to-run-my-python-script-every-time/m-p/215506#M2850</guid>
      <dc:creator>SIddharth5794</dc:creator>
      <dc:date>2015-09-07T11:23:17Z</dc:date>
    </item>
  </channel>
</rss>

