<?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: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522831#M147447</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;looks like its not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(query1) OR (query2) | rex "CommonField1::(?&amp;lt;id&amp;gt;[^,]+)," | rex "CommonField2::(?&amp;lt;id&amp;gt;[^,]+)," | dedup id | table id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Samples&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;query1= "index=* host=* " "field1:: value1 createdOn:: "9/30/20 10:14 AM", commonfield1::"&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;abds&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;", field2 ::valu2"&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;query2&amp;nbsp; = "field:: value createdOn::"2020-09-30 23:31:00" commonfield2::"&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;abds&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;, field2 ::valu21"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;one more search result possible for query2 can be "&lt;/SPAN&gt;field:: value createdOn::"2020-09-30 23:31:00" commonfield2::"&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;Cbds&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;, field2 ::valu21"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This itself is not giving the common results by abds&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Oct 2020 03:43:12 GMT</pubDate>
    <dc:creator>venky10</dc:creator>
    <dc:date>2020-10-04T03:43:12Z</dc:date>
    <item>
      <title>Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522699#M147393</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am relatively newer to SPL, i have a usecase to evaluate time difference bwn two fields in two different logs with common data field in both query1 and query 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample log looks like this.&lt;/P&gt;&lt;P&gt;log1 - "field1:: value1 createdOn1:: "9/30/20 10:14 AM", commonfield:: "abds"&lt;/P&gt;&lt;P&gt;log2 - "field:: value createdOn2::"2020-09-30 23:30:00" commonfield::"abds"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have to correlate both of them by commonfieldValue and get difference of&amp;nbsp;createdOn2-createdOn1 in seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Experts, could you help me with this?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 15:59:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522699#M147393</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-02T15:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522704#M147394</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227080"&gt;@venky10&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to transform the dates in epochtime, then you can correlate them, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| eval epoch_createdOn=coalesce(strptime(createdOn1,"%m/%d/%y %H:%M"),strptime(createdOn2,"%m/%d/%y %H:%M")
| stats earliest(epoch_createdOn) AS earliest latest(epoch_createdOn) AS latest BY commonfield
| eval diff=latest-earliest&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 16:07:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522704#M147394</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-02T16:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522776#M147430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; thanks for the response.&lt;/P&gt;&lt;P&gt;i just realised that for log1 there are mulutiple related logs&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample log looks like this.&lt;/P&gt;&lt;P&gt;log1 - "field1:: value1 createdOn:: "9/30/20 10:14 AM", commonfield:: "abds, field2 ::valu2"&lt;/P&gt;&lt;P&gt;related logs-&lt;/P&gt;&lt;P&gt;log2 - "field:: value createdOn::"2020-09-30 23:30:00" commonfield::"abds, field2 ::valu2"&lt;/P&gt;&lt;P&gt;log3 - "field:: value createdOn::"2020-09-30 23:31:00" commonfield::"abds, field2 ::valu2"&lt;/P&gt;&lt;P&gt;log4 - "field:: value createdOn::"2020-09-30 23:32:00" commonfield::"abds, field2 ::valu2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to take earliest createdOn among log2/3/4 based on&amp;nbsp;commonfield value from log1 and print the diff of time bwn createdOn.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 06:29:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522776#M147430</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-03T06:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522777#M147431</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227080"&gt;@venky10&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I didn't understand if log1 is in the range of logs where to find earliest and latest or not,&lt;/P&gt;&lt;P&gt;if it's in the range, you can simplify my previous search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| eval epoch_createdOn=strptime(createdOn,"%m/%d/%y %H:%M")
| stats earliest(epoch_createdOn) AS earliest latest(epoch_createdOn) AS latest BY commonfield
| eval diff=latest-earliest&lt;/LI-CODE&gt;&lt;P&gt;if instead it's outside the range It's not clear for me how it enters in the search.&lt;/P&gt;&lt;P&gt;Anyway, from my example you can take the approach to solve the problem:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;convert dates in epochtime,&lt;/LI&gt;&lt;LI&gt;use stats BY the common key,&lt;/LI&gt;&lt;LI&gt;use earliest and latest functions in stats.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 06:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522777#M147431</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-03T06:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522778#M147432</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; thanks for the response.&lt;/P&gt;&lt;P&gt;i got the gist of what you suggest.&lt;/P&gt;&lt;P&gt;I need to pick latest&amp;nbsp;createdOn value from log2/3/4 related to log1 and then find the difference of createdOn bwn log1 and log2/3/4 final value. Let me try the query, still figuring out the how to join by commonfield as very new to SPL.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 07:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522778#M147432</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-03T07:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522783#M147433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227080"&gt;@venky10&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;my last hist should be the correct one, please, try it.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 08:02:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522783#M147433</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-03T08:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522792#M147435</link>
      <description>&lt;P&gt;i think, you got me wrong.&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is what i am trying to. I am getting lost here &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(index=* host=* " "field1:: value1 createdOn:: "9/30/20 10:14 AM", commonfield1::"abds", field2 ::valu2" | rex "commonfield1::(?&amp;lt;a1&amp;gt;[^,]+)," | eval&amp;nbsp;epoch_createdOn=strptime(createdOn,"%m/%d/%y %H:%M")&lt;BR /&gt;) OR (index=* "field:: value createdOn::"2020-09-30 23:30:00" commonfield2::"abds, field2 ::valu2") | rex "commonfield2::(?&amp;lt;a2&amp;gt;[^,]+)," | eval epoch_createdOn=strptime(createdOn,""%m/%d/%y %H:%M"")&lt;BR /&gt;| stats earliest(epoch_createdOn) AS earliest BY a2 | where a1==a2&lt;BR /&gt;| eval earliest- epoch_createdOn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;query1= "index=* host=* " "field1:: value1 createdOn:: "9/30/20 10:14 AM", commonfield1::"abds", field2 ::valu2"&amp;nbsp;&lt;/P&gt;&lt;P&gt;query2 =&amp;nbsp;index=* "field:: value createdOn::"2020-09-30 23:30:00" commonfield2::"abds, field2 ::valu2" gives multiple results.&lt;/P&gt;&lt;P&gt;Please help me here.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 13:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522792#M147435</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-03T13:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522795#M147436</link>
      <description>&lt;P&gt;here the expected value for below example is (&lt;SPAN&gt;2020-09-30 20:30:00&amp;nbsp; -&amp;nbsp;2020-09-30 23:31:00)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;query1= "index=* host=* " "field1:: value1 createdOn:: "9/30/20 10:14 AM", commonfield1::"abds", field2 ::valu2"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;related 3 logs for above string is &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;field:: value createdOn::"2020-09-30 23:31:00" commonfield2::"abds, field2 ::valu21&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;field:: value createdOn::"2020-09-30 23:32:00" commonfield2::"abds, field2 ::valu22&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;field:: value createdOn::"2020-09-30 23:33:00" commonfield2::"abds, field2 ::valu24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@&lt;SPAN class="login-bold"&gt;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406" target="_self"&gt;woodcock&lt;/A&gt;&amp;nbsp;pls help.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 14:42:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522795#M147436</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-03T14:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522796#M147437</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227080"&gt;@venky10&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;there are many not correct things in your search:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;you cannot put an eval commandin a search string,&lt;/LI&gt;&lt;LI&gt;pipes have the meaning of pipe in linux: the left part is the input for the right part, so you cannot put a pipe in parenthesis,&lt;/LI&gt;&lt;LI&gt;after stats command you have only the fields of stats command, the other fields are loose, so in your example there's a1 and &lt;SPAN&gt;epoch_createdOn aren't still available, to have them you have to insert them in the stats (e.g. using earliest or values),&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;the search string isn't correct because you cannot use quotes inside a search string witout escaping them.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;So, probably this isn't what you want, but, as I said, see the approach.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* host=* ("field1:: value1 createdOn:: \"9/30/20 10:14 AM\", commonfield1::\"abds\" field2 ::valu2" OR "field:: value createdOn::\"2020-09-30 23:30:00\" commonfield2::\"abds, field2 ::valu2")
| rex "commonfield1::(?&amp;lt;aa&amp;gt;[^,]+)," 
| rex "commonfield2::(?&amp;lt;aa&amp;gt;[^,]+)," 
| eval epoch_createdOn=strptime(createdOn,""%m/%d/%y %H:%M""
| stats earliest(epoch_createdOn) AS earliest latest(epoch_createdOn) AS latest BY aa 
| eval earliest-latest&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 14:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522796#M147437</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-03T14:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522797#M147438</link>
      <description>&lt;P&gt;will this part of your query&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| rex "commonfield1::(?&amp;lt;aa&amp;gt;[^,]+)," 
| rex "commonfield2::(?&amp;lt;aa&amp;gt;[^,]+),"&lt;/PRE&gt;&lt;P&gt;take care of values in both commonfield1 and commonfield2 to be same?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 15:16:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522797#M147438</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-03T15:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522798#M147439</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227080"&gt;@venky10&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in this way you can have a common key to correlate.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 15:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522798#M147439</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-03T15:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522831#M147447</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;looks like its not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(query1) OR (query2) | rex "CommonField1::(?&amp;lt;id&amp;gt;[^,]+)," | rex "CommonField2::(?&amp;lt;id&amp;gt;[^,]+)," | dedup id | table id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Samples&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;query1= "index=* host=* " "field1:: value1 createdOn:: "9/30/20 10:14 AM", commonfield1::"&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;abds&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;", field2 ::valu2"&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;query2&amp;nbsp; = "field:: value createdOn::"2020-09-30 23:31:00" commonfield2::"&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;abds&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;, field2 ::valu21"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;one more search result possible for query2 can be "&lt;/SPAN&gt;field:: value createdOn::"2020-09-30 23:31:00" commonfield2::"&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;Cbds&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;, field2 ::valu21"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This itself is not giving the common results by abds&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 03:43:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522831#M147447</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-04T03:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522840#M147451</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the query you suggested works for correlating but i am unable to print difference bwn createdOn value from query1 with earliest values calculated after grouping.&lt;/P&gt;&lt;P&gt;i.e, diff below is coming as empty. i think we are losing the epoch_CreatedOn after grouping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* host=* ("field1:: value1 createdOn:: \"9/30/20 10:14 AM\", commonfield1::\"abds\" field2 ::valu2" OR "field:: value createdOn::\"2020-09-30 23:30:00\" commonfield2::\"abds, field2 ::valu2")
| rex "commonfield1::(?&amp;lt;aa&amp;gt;[^,]+)," 
| rex "commonfield2::(?&amp;lt;aa&amp;gt;[^,]+)," 
| eval epoch_createdOn=strptime(createdOn,""%m/%d/%y %H:%M""
| stats earliest(epoch_createdOn) AS earliest BY aa 
| eval diff = epoch_createdOn-earliest | table diff&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 04 Oct 2020 12:22:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522840#M147451</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-04T12:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate data from two diffrent splunk logs and evaluate the diffrence  of time fields in both logs.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522841#M147452</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=* host=* ("field1:: value1 createdOn1:: \"9/30/20 10:14 AM\", commonfield1::\"abds\" field2 ::valu2" OR "field:: value createdOn::\"2020-09-30 23:30:00\" commonfield2::\"abds, field2 ::valu2")
| rex "commonfield1::(?&amp;lt;aa&amp;gt;[^,]+)," 
| rex "commonfield2::(?&amp;lt;aa&amp;gt;[^,]+)," 
| eval epoch_createdOn1=strptime(createdOn,""%m/%d/%y %H:%M""
| stats min(epoch_createdOn -epoch_createdOn1) AS time_diff BY aa 
| table time_diff&lt;/LI-CODE&gt;&lt;P&gt;this also does not work.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 12:44:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlate-data-from-two-diffrent-splunk-logs-and-evaluate-the/m-p/522841#M147452</guid>
      <dc:creator>venky10</dc:creator>
      <dc:date>2020-10-04T12:44:28Z</dc:date>
    </item>
  </channel>
</rss>

