<?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: scripted input execute condition in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/scripted-input-execute-condition/m-p/81048#M16717</link>
    <description>&lt;P&gt;I don't have an answer, per se, but I have some input:&lt;/P&gt;

&lt;P&gt;There's a magic value to interval in an inputs.conf script: specifier (I think it's zero) that means "run once on startup". But then you'd have to restart the forwarder a lot.&lt;/P&gt;

&lt;P&gt;If I were asked to implement this, I would put the logic in my script. I'd use a persistent state file (maybe in $SPLUNK_HOME/var/lib/splunk/persistentstorage) to keep track of the last stamp we'd seen, then use this script to inspect the file on each run. Most executions of the script are going to be no-ops "data hasn't changed!", but when it does execute the decoding loop, you'll want to make sure that the interval of the script is longer than the amount of time a single run would take. Splunk &lt;EM&gt;shouldn't&lt;/EM&gt; start a second instance until the first is done, but I would schedule my runs so that I didn't have to rely upon that.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2014 17:15:39 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2014-01-16T17:15:39Z</dc:date>
    <item>
      <title>scripted input execute condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/scripted-input-execute-condition/m-p/81047#M16716</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We are working towards a scripted input of AIX errpt messages and would like to kick the script off whenever it notices the timestamp changes, ie. when a new event is added. The file is binary so we need to have a custom script to run first to decode the data then dump it to a file. Any idea on how to do a conditional script interval in inputs.conf? Also, if you have seen a better way to aggregate errpt messages please feel free to share. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2013 12:32:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/scripted-input-execute-condition/m-p/81047#M16716</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2013-10-03T12:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: scripted input execute condition</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/scripted-input-execute-condition/m-p/81048#M16717</link>
      <description>&lt;P&gt;I don't have an answer, per se, but I have some input:&lt;/P&gt;

&lt;P&gt;There's a magic value to interval in an inputs.conf script: specifier (I think it's zero) that means "run once on startup". But then you'd have to restart the forwarder a lot.&lt;/P&gt;

&lt;P&gt;If I were asked to implement this, I would put the logic in my script. I'd use a persistent state file (maybe in $SPLUNK_HOME/var/lib/splunk/persistentstorage) to keep track of the last stamp we'd seen, then use this script to inspect the file on each run. Most executions of the script are going to be no-ops "data hasn't changed!", but when it does execute the decoding loop, you'll want to make sure that the interval of the script is longer than the amount of time a single run would take. Splunk &lt;EM&gt;shouldn't&lt;/EM&gt; start a second instance until the first is done, but I would schedule my runs so that I didn't have to rely upon that.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2014 17:15:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/scripted-input-execute-condition/m-p/81048#M16717</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2014-01-16T17:15:39Z</dc:date>
    </item>
  </channel>
</rss>

