<?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: Calculations on 2 different fields from 2 separate logs, newbie here in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30367#M6142</link>
    <description>&lt;P&gt;Is there some kind of grouping field that Splunk can use to match two lines together?&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2013 10:10:48 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-08-09T10:10:48Z</dc:date>
    <item>
      <title>Calculations on 2 different fields from 2 separate logs, newbie here</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30366#M6141</link>
      <description>&lt;P&gt;Hi, I've got 2 log lines which look similar to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Thu Aug 08 16:45:01 2013 | Field1 : 25
Thu Aug 08 16:45:01 2013 | Field2 : 30
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Does anyone know how to find Field3 which is (Field2-Field1)&lt;/P&gt;

&lt;P&gt;I've tried: &lt;BR /&gt;
    | eval Field3=Field2-Field1 |&lt;/P&gt;

&lt;P&gt;But because they're not from the same log line, Field3 is always null.&lt;BR /&gt;
Any advice is appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 10:07:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30366#M6141</guid>
      <dc:creator>606866581</dc:creator>
      <dc:date>2013-08-09T10:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations on 2 different fields from 2 separate logs, newbie here</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30367#M6142</link>
      <description>&lt;P&gt;Is there some kind of grouping field that Splunk can use to match two lines together?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 10:10:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30367#M6142</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-08-09T10:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations on 2 different fields from 2 separate logs, newbie here</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30368#M6143</link>
      <description>&lt;P&gt;unfortunately these logs are pretty bare, they're not much longer than the example above ^&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 10:13:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30368#M6143</guid>
      <dc:creator>606866581</dc:creator>
      <dc:date>2013-08-09T10:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations on 2 different fields from 2 separate logs, newbie here</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30369#M6144</link>
      <description>&lt;P&gt;Are they reliably group-able by timestamp? If not, how should Splunk guess which two lines to match up?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 10:15:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30369#M6144</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-08-09T10:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations on 2 different fields from 2 separate logs, newbie here</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30370#M6145</link>
      <description>&lt;P&gt;Actually yes, the timestamp is guaranteed to be exactly the same&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 10:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30370#M6145</guid>
      <dc:creator>606866581</dc:creator>
      <dc:date>2013-08-09T10:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations on 2 different fields from 2 separate logs, newbie here</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30371#M6146</link>
      <description>&lt;P&gt;Assuming the two events have the same timestamp and no other events with that timestamp exist, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eventstats first(Field1) as f1 first(Field2) as f2 by _time | eval f3 = f2 - f1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Aug 2013 10:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30371#M6146</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-08-09T10:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculations on 2 different fields from 2 separate logs, newbie here</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30372#M6147</link>
      <description>&lt;P&gt;Worked perfectly, Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 10:28:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculations-on-2-different-fields-from-2-separate-logs-newbie/m-p/30372#M6147</guid>
      <dc:creator>606866581</dc:creator>
      <dc:date>2013-08-09T10:28:12Z</dc:date>
    </item>
  </channel>
</rss>

