<?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: Can I set different interval of execution for different hosts receiving same scripted input app from deployment server? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393707#M70292</link>
    <description>&lt;P&gt;We have two servers, each gets updated with network information every 12 hour, therefore we need to collect the information from each host at the interval of 12 hour.&lt;BR /&gt;
Like script on host 1 should run at 12:00 afternoon and on host 2 it should run at 00:00 midnight.&lt;BR /&gt;
both hosts starts with "TST" and differ by number appended at the end.&lt;BR /&gt;
TST1 and TST2. &lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2019 18:17:13 GMT</pubDate>
    <dc:creator>saurabh009</dc:creator>
    <dc:date>2019-02-21T18:17:13Z</dc:date>
    <item>
      <title>Can I set different interval of execution for different hosts receiving same scripted input app from deployment server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393705#M70290</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
We have a requirement where we need to deploy an app having a script in it but interval of execution of script should differ for each hosts receiving the app.&lt;BR /&gt;
Is this possible to do in the same app?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 15:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393705#M70290</guid>
      <dc:creator>saurabh009</dc:creator>
      <dc:date>2019-02-21T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set different interval of execution for different hosts receiving same scripted input app from deployment server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393706#M70291</link>
      <description>&lt;P&gt;Could you provide more details on your requirement like, how many different host-interval combination exists there, and do similar hosts (which requires same interval) follows a naming pattern? There is no direct way to achieve this but there may be a (dirty) workaround for it, but what's the purpose behind having different intervals?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 17:29:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393706#M70291</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-02-21T17:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set different interval of execution for different hosts receiving same scripted input app from deployment server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393707#M70292</link>
      <description>&lt;P&gt;We have two servers, each gets updated with network information every 12 hour, therefore we need to collect the information from each host at the interval of 12 hour.&lt;BR /&gt;
Like script on host 1 should run at 12:00 afternoon and on host 2 it should run at 00:00 midnight.&lt;BR /&gt;
both hosts starts with "TST" and differ by number appended at the end.&lt;BR /&gt;
TST1 and TST2. &lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 18:17:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393707#M70292</guid>
      <dc:creator>saurabh009</dc:creator>
      <dc:date>2019-02-21T18:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set different interval of execution for different hosts receiving same scripted input app from deployment server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393708#M70293</link>
      <description>&lt;P&gt;Option 1) &lt;BR /&gt;
Write the logic into a small shell script that checks the host name and runs or doesn't run the child process. &lt;/P&gt;

&lt;P&gt;Option 2)&lt;BR /&gt;
Create a "common" app that contains the script and any other parts that need to be deployed.&lt;BR /&gt;
Create a unique app for each unique time period you want the job to run for. These apps will not contain the script, but will contain just the inputs.conf and the stanza to specify the input and its run frequency. A stanza in one app can call a script from another app.&lt;BR /&gt;
This is a good option becuase you don't have duplicated code or config.&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 18:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393708#M70293</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-21T18:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set different interval of execution for different hosts receiving same scripted input app from deployment server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393709#M70294</link>
      <description>&lt;P&gt;If the host names are static, you could handle the execution (collection of network information) in your script itself. What I mean is , your script will run every 12 hour (OR a cron like &lt;CODE&gt;0 0,12 * * *&lt;/CODE&gt;) on both hosts. On every run, your script can check the current time and current host and skip execution based on host/time combination. ( if current hour is 0 and host=TST1, don't execute, if host=TST2 execute it.)&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 20:14:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393709#M70294</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-02-21T20:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set different interval of execution for different hosts receiving same scripted input app from deployment server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393710#M70295</link>
      <description>&lt;P&gt;I found an easiest way to do it.&lt;BR /&gt;
From inputs.conf , I am passing parameter to the script as TST1 and TST2 from separate monitoring stanza.&lt;BR /&gt;
Each Stanza has their own execution interval and script reads the passed parameter and matches with the hostname where it's running.&lt;/P&gt;

&lt;P&gt;Thanks for inputs @chrisyoungerjds @somesoni2 &lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 16:48:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393710#M70295</guid>
      <dc:creator>saurabh009</dc:creator>
      <dc:date>2019-02-28T16:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set different interval of execution for different hosts receiving same scripted input app from deployment server?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393711#M70296</link>
      <description>&lt;P&gt;There are 2 ways:&lt;BR /&gt;
1: Have 2 different Splunk apps, each with a different cron setting for the search.&lt;BR /&gt;
2: Use cron value of &lt;CODE&gt;*/12 * * * *&lt;/CODE&gt; and edit the script and have it check which server it is on.  If it is on host 1, run on the first half and exit on the 2nd half doing nothing; otherwise, vice-versa.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 03:18:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-set-different-interval-of-execution-for-different-hosts/m-p/393711#M70296</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-03-04T03:18:07Z</dc:date>
    </item>
  </channel>
</rss>

