<?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 Index-time extraction of multiple timestamps fields within a single event in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29800#M5153</link>
    <description>&lt;P&gt;Need to set up searching and alerting for batch-job logging.  Each log line will have the following format:&lt;/P&gt;

&lt;P&gt;timestamp|uuid|appname|next-timestamp|max-execution-time|start-stop-code&lt;/P&gt;

&lt;P&gt;So I need to set up a search that starts with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="batch" | transaction fields=uuid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then add logic that tests for:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;linecount=1 | where ( timestamp +
max-execution-time &amp;gt; current time )&lt;/LI&gt;
&lt;LI&gt;Most recent "next-timestamp" for each
appname is less than current time&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Problem is, I don't know how to set up index-time field extraction for multiple timestamps within a single event.  Help?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2013 21:03:57 GMT</pubDate>
    <dc:creator>robert_vincent</dc:creator>
    <dc:date>2013-08-08T21:03:57Z</dc:date>
    <item>
      <title>Index-time extraction of multiple timestamps fields within a single event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29800#M5153</link>
      <description>&lt;P&gt;Need to set up searching and alerting for batch-job logging.  Each log line will have the following format:&lt;/P&gt;

&lt;P&gt;timestamp|uuid|appname|next-timestamp|max-execution-time|start-stop-code&lt;/P&gt;

&lt;P&gt;So I need to set up a search that starts with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="batch" | transaction fields=uuid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then add logic that tests for:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;linecount=1 | where ( timestamp +
max-execution-time &amp;gt; current time )&lt;/LI&gt;
&lt;LI&gt;Most recent "next-timestamp" for each
appname is less than current time&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Problem is, I don't know how to set up index-time field extraction for multiple timestamps within a single event.  Help?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 21:03:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29800#M5153</guid>
      <dc:creator>robert_vincent</dc:creator>
      <dc:date>2013-08-08T21:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Index-time extraction of multiple timestamps fields within a single event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29801#M5154</link>
      <description>&lt;P&gt;Finally one timestamp will be recognized. Better to do leave it as it is, the first timestamp field will be recorded as _time field. Then you can go for the field extraction on the UI, which will be easier for you. it will add those entries to props.conf, then you can refer them to do the manual extraction entry yourself.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/admin/Propsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 21:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29801#M5154</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-08-08T21:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Index-time extraction of multiple timestamps fields within a single event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29802#M5155</link>
      <description>&lt;P&gt;Is your data showing up as a file's worth of data in one event? Or, is each line showing up as a single event with it's own timestamp?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 02:09:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29802#M5155</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-08-09T02:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Index-time extraction of multiple timestamps fields within a single event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29803#M5156</link>
      <description>&lt;P&gt;You do not normally need to extract anything at index-time. You can make your comparisons with search-time extracted data.&lt;/P&gt;

&lt;P&gt;Don't know what you really want to do, and what the transaction is used for, but if max-execution-time is in seconds, the logic/math will be rather simple. Current time (when the search starts) can be found via &lt;CODE&gt;now()&lt;/CODE&gt;. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| eval XXX = _time + max-execution-time 
| eval YYY = if(XXX &amp;gt; now() AND next-timestamp &amp;lt; now(),"apple", "orange")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Perhaps you want to also look at the &lt;CODE&gt;dedup&lt;/CODE&gt; command to let you only get the most recent event for some field.&lt;/P&gt;

&lt;P&gt;See; &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Some more explanation and a few sample events would let people here understand your problem better and be able to help you more.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 08:16:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-time-extraction-of-multiple-timestamps-fields-within-a/m-p/29803#M5156</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-09T08:16:30Z</dc:date>
    </item>
  </channel>
</rss>

