<?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: job based log file processing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/job-based-log-file-processing/m-p/157130#M31848</link>
    <description>&lt;P&gt;Using metadata is probably the fastest way to get the start/end timestamps for each source. You can then get the difference in seconds pretty easily. You'll need to have some kind of search that returns the record count for each file and that might involve using rex to pull that field out. That field extraction should happen in the subsearch part of the example below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sources index=yourindex | eval duration=lastTime-firstTime | join source [search index=yourindex recordcount=* | top 1 recordcount by source] | table source, duration, recordcount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you're going to have a lot of events, optimizing that subsearch will be crucial when you start getting into those weekly/monthly groupings. There will be some stuff to add to turn this into a chart, but I'd probably start with the field extraction and getting the duration and record count into a table and go from there. Good luck!&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2013 04:10:38 GMT</pubDate>
    <dc:creator>jtacy</dc:creator>
    <dc:date>2013-11-27T04:10:38Z</dc:date>
    <item>
      <title>job based log file processing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/job-based-log-file-processing/m-p/157128#M31846</link>
      <description>&lt;P&gt;Newbie here - Just evaluating Splunk.  &lt;/P&gt;

&lt;P&gt;I set up my source to watch a directory and my source type filtering by file name pattern.  This is all great, it parsed out errors &amp;amp; messages nicely with no effort.  &lt;/P&gt;

&lt;P&gt;Now I want to take it a step further.  When each file arrives and is closed (the discrete job finished), I want to evaluate things like run time (time between last &amp;amp; first time stamp in the log file) and record counts (a string pulled from a specific message in the log file).  Then I want to create trending reports on these values on a daily/weekly/monthly basis. &lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2013 21:57:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/job-based-log-file-processing/m-p/157128#M31846</guid>
      <dc:creator>levinro</dc:creator>
      <dc:date>2013-11-26T21:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: job based log file processing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/job-based-log-file-processing/m-p/157129#M31847</link>
      <description>&lt;P&gt;Individual log files are generally considered to be a Source, not sure if you can do a transaction on a Source.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 01:09:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/job-based-log-file-processing/m-p/157129#M31847</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-11-27T01:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: job based log file processing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/job-based-log-file-processing/m-p/157130#M31848</link>
      <description>&lt;P&gt;Using metadata is probably the fastest way to get the start/end timestamps for each source. You can then get the difference in seconds pretty easily. You'll need to have some kind of search that returns the record count for each file and that might involve using rex to pull that field out. That field extraction should happen in the subsearch part of the example below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sources index=yourindex | eval duration=lastTime-firstTime | join source [search index=yourindex recordcount=* | top 1 recordcount by source] | table source, duration, recordcount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you're going to have a lot of events, optimizing that subsearch will be crucial when you start getting into those weekly/monthly groupings. There will be some stuff to add to turn this into a chart, but I'd probably start with the field extraction and getting the duration and record count into a table and go from there. Good luck!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 04:10:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/job-based-log-file-processing/m-p/157130#M31848</guid>
      <dc:creator>jtacy</dc:creator>
      <dc:date>2013-11-27T04:10:38Z</dc:date>
    </item>
  </channel>
</rss>

