<?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 How to correlate across two lists in a stats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646510#M223775</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to correlate across two lists and display the results.&lt;/P&gt;&lt;P&gt;Log data:&lt;/P&gt;&lt;P&gt;06/10/2023 05:04:12&amp;nbsp;&amp;nbsp;ACMIUY-6500-2345-20230610050412.pdf&lt;BR /&gt;06/10/2023 05:05:12&amp;nbsp; ACMIUY-6500-2345-20230610050412-success.csv&lt;/P&gt;&lt;P&gt;06/10/2023 07:14:22 DCCOUB-86895-20230610071422.pdf&lt;/P&gt;&lt;P&gt;Note: The data is in the same index and I don't want to use join&lt;/P&gt;&lt;P&gt;mysearch | stats list(file_sent) list(file_received) list(sent_time) list(received_time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;Sent Time&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;File_Sent&amp;nbsp;&lt;/TD&gt;&lt;TD width="12.5%"&gt;Received Time&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;File_Received&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;Elapsed_time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;06/10/2023 05:04:12&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;ACMIUY-6500-2345-20230610050412.pdf&lt;/TD&gt;&lt;TD width="12.5%"&gt;06/10/2023 05:05:12&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;ACMIUY-6500-2345-20230610050412-success.csv&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;00:01:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/10/2023 07:14:22&lt;/TD&gt;&lt;TD&gt;DCCOUB-86895-20230610071422.pdf&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 18:59:38 GMT</pubDate>
    <dc:creator>t_splunk_d</dc:creator>
    <dc:date>2023-06-10T18:59:38Z</dc:date>
    <item>
      <title>How to correlate across two lists in a stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646510#M223775</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to correlate across two lists and display the results.&lt;/P&gt;&lt;P&gt;Log data:&lt;/P&gt;&lt;P&gt;06/10/2023 05:04:12&amp;nbsp;&amp;nbsp;ACMIUY-6500-2345-20230610050412.pdf&lt;BR /&gt;06/10/2023 05:05:12&amp;nbsp; ACMIUY-6500-2345-20230610050412-success.csv&lt;/P&gt;&lt;P&gt;06/10/2023 07:14:22 DCCOUB-86895-20230610071422.pdf&lt;/P&gt;&lt;P&gt;Note: The data is in the same index and I don't want to use join&lt;/P&gt;&lt;P&gt;mysearch | stats list(file_sent) list(file_received) list(sent_time) list(received_time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;Sent Time&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;File_Sent&amp;nbsp;&lt;/TD&gt;&lt;TD width="12.5%"&gt;Received Time&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;File_Received&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;Elapsed_time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="24px"&gt;06/10/2023 05:04:12&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;ACMIUY-6500-2345-20230610050412.pdf&lt;/TD&gt;&lt;TD width="12.5%"&gt;06/10/2023 05:05:12&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;ACMIUY-6500-2345-20230610050412-success.csv&lt;/TD&gt;&lt;TD width="25%" height="24px"&gt;00:01:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/10/2023 07:14:22&lt;/TD&gt;&lt;TD&gt;DCCOUB-86895-20230610071422.pdf&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 18:59:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646510#M223775</guid>
      <dc:creator>t_splunk_d</dc:creator>
      <dc:date>2023-06-10T18:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate across two lists in a stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646511#M223776</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "(?&amp;lt;fullfilename&amp;gt;\S+)$"
| rex field=fullfilename "(?&amp;lt;filename&amp;gt;\S+)(?&amp;lt;event&amp;gt;\.pdf|\-success\.csv)$"
| eval sentTime=if(event=".pdf",_time,null())
| eval receivedTime=if(event=".pdf",null(),_time)
| eval fileSent=if(event=".pdf",fullfilename,null())
| eval fileReceived=if(event=".pdf",null(),fullfilename)
| stats values(sentTime) as sentTime values(fileSent) as fileSent values(receivedTime) as receivedTime values(fileReceived) as fileReceived by filename
| eval elapseTime=tostring(receivedTime-sentTime,"duration")&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 20:17:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646511#M223776</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-10T20:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate across two lists in a stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646513#M223778</link>
      <description>&lt;P&gt;I also see for some file received the file name is:&lt;BR /&gt;&lt;SPAN&gt;PD0018MM-220385-20230609211505.20230609211740-success.csv&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How to modify so that the filename is extracted as&amp;nbsp;PD0018MM-220385-20230609211505&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;| rex field=fullfilename "(?&amp;lt;filename&amp;gt;\S+)(?&amp;lt;event&amp;gt;\.pdf|\-success\.csv)$"&lt;/PRE&gt;&lt;P&gt;Also how display "Pending" if no corresponding file_received for the file_sent?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 01:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646513#M223778</guid>
      <dc:creator>t_splunk_d</dc:creator>
      <dc:date>2023-06-11T01:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate across two lists in a stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646522#M223783</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex field=fullfilename "(?&amp;lt;filename&amp;gt;[^\.\s]+)(?&amp;lt;event&amp;gt;\.pdf|\-success\.csv)$"&lt;/LI-CODE&gt;&lt;P&gt;You could also add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fillnull value="Pending" receivedTime fileReceived&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 07:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-across-two-lists-in-a-stats/m-p/646522#M223783</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-11T07:49:02Z</dc:date>
    </item>
  </channel>
</rss>

