<?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: Join two logs in Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703917#M238563</link>
    <description>&lt;P&gt;here is the splunk query i am trying to use, Common field in 2 query is&amp;nbsp;ORDERS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=source&amp;nbsp;"status for : * " | rex field=_raw "status for : (?&amp;lt;ORDERS&amp;gt;.*?)" | join ORDERS [search Message=Request for : * | rex field=_raw "data=[A-Za-z0-9-]+\|(?P&amp;lt;ORDERS&amp;gt;[\w\.]+)" | rex field=_raw "\"unique\"\:\"(?P&amp;lt;UNIQUEID&amp;gt;[A-Z0-9]+)\""] | table ORDERS UNIQUEID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2024 11:26:19 GMT</pubDate>
    <dc:creator>Athira</dc:creator>
    <dc:date>2024-11-08T11:26:19Z</dc:date>
    <item>
      <title>Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703914#M238561</link>
      <description>&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I wanted to search and save result as table from two log statements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;one log statement using regex to extract "ORDERS"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and another log statement using regex to extract "ORDERS, UNIQUEID"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;my requirement is to use the combine two log statements&amp;nbsp; on "ORDERS"&amp;nbsp; and pull the ORDER and UNIQUEID in table&amp;nbsp; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am using Join to combine the two log statements on "&lt;SPAN&gt;ORDERS" , but my splunk query not returning any results&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 10:54:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703914#M238561</guid>
      <dc:creator>Athira</dc:creator>
      <dc:date>2024-11-08T10:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703915#M238562</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273872"&gt;@Athira&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;could you share your two searches?&lt;/P&gt;&lt;P&gt;in few words, to correlate events, you need to find a common key, sharing your searches, I could guide you in this.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 11:06:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703915#M238562</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-11-08T11:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703917#M238563</link>
      <description>&lt;P&gt;here is the splunk query i am trying to use, Common field in 2 query is&amp;nbsp;ORDERS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=source&amp;nbsp;"status for : * " | rex field=_raw "status for : (?&amp;lt;ORDERS&amp;gt;.*?)" | join ORDERS [search Message=Request for : * | rex field=_raw "data=[A-Za-z0-9-]+\|(?P&amp;lt;ORDERS&amp;gt;[\w\.]+)" | rex field=_raw "\"unique\"\:\"(?P&amp;lt;UNIQUEID&amp;gt;[A-Z0-9]+)\""] | table ORDERS UNIQUEID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 11:26:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703917#M238563</guid>
      <dc:creator>Athira</dc:creator>
      <dc:date>2024-11-08T11:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703919#M238564</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273872"&gt;@Athira&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;please try this approach:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=source "status for : * ") OR "Message=Request for : *"
| rex field=_raw "status for : (?&amp;lt;ORDERS&amp;gt;.*?)" 
| rex field=_raw "data=[A-Za-z0-9-]+\|(?P&amp;lt;ORDERS&amp;gt;[\w\.]+)" 
| rex field=_raw "\"unique\"\:\"(?P&amp;lt;UNIQUEID&amp;gt;[A-Z0-9]+)\""] 
| stats count values(UNIQUEID) AS UNIQUEID BY ORDERS &lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=source "status for : * " 
| rex field=_raw "status for : (?&amp;lt;ORDERS&amp;gt;.*?)" 
| append [ search 
     Message=Request for : * 
     | rex field=_raw "data=[A-Za-z0-9-]+\|(?P&amp;lt;ORDERS&amp;gt;[\w\.]+)" 
     | rex field=_raw "\"unique\"\:\"(?P&amp;lt;UNIQUEID&amp;gt;[A-Z0-9]+)\""] 
| stats count values(UNIQUEID) AS UNIQUEID BY ORDERS &lt;/LI-CODE&gt;&lt;P&gt;The second solution has the limit of 50,000 results for the subsearch.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 12:10:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703919#M238564</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-11-08T12:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703921#M238565</link>
      <description>&lt;P&gt;above query produce results for all the ORDERS &amp;amp;UNIQUEID . my subquery fetches ORDERS &amp;amp; UNIQUEID&lt;/P&gt;&lt;P&gt;i am trying to match the ORDERS in subquery with the outer query, and result display should be&amp;nbsp; ORDERS &amp;amp; UNIQUEID.&amp;nbsp; &amp;nbsp;the common field in two query i am using is ORDERS&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 13:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703921#M238565</guid>
      <dc:creator>Athira</dc:creator>
      <dc:date>2024-11-08T13:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703926#M238569</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273872"&gt;@Athira&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;my search correlates the results from both the searches usig ORDERS and displays ORDERS and&amp;nbsp;&lt;SPAN&gt;UNIQUEID, whats missing?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please share an example of data and results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 13:29:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/703926#M238569</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-11-08T13:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704058#M238603</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;&lt;/P&gt;&lt;P&gt;thanks for your inputs, i have some correction in my query.&lt;/P&gt;&lt;P&gt;in the outer query i am trying to pull&amp;nbsp; the ORDERS which is&amp;nbsp;&lt;STRONG&gt;Not available&lt;/STRONG&gt;&amp;nbsp;.I need to match the ORDERS&amp;nbsp; which is&amp;nbsp;&lt;STRONG&gt;Not available &lt;/STRONG&gt;to with&amp;nbsp;the ORDERS on Sub query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result to be displayed&amp;nbsp;&amp;nbsp;ORDERS&amp;nbsp; &amp;amp; UNIQUEID .&amp;nbsp;&amp;nbsp;common field in two query is ORDERS&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the query i am using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=source&amp;nbsp;"status for : *&amp;nbsp; |&amp;nbsp;"status for : * " AND "Not available"&amp;nbsp; | rex field=_raw "status for : (?&amp;lt;ORDERS&amp;gt;.*?)" | join ORDERS [search Message=Request for : * | rex field=_raw "data=[A-Za-z0-9-]+\|(?P&amp;lt;ORDERS&amp;gt;[\w\.]+)" | rex field=_raw "\"unique\"\:\"(?P&amp;lt;UNIQUEID&amp;gt;[A-Z0-9]+)\""] | table ORDERS UNIQUEID&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 09:24:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704058#M238603</guid>
      <dc:creator>Athira</dc:creator>
      <dc:date>2024-11-11T09:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704088#M238617</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;&lt;/P&gt;&lt;P&gt;I have shared the details, could you check&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 13:10:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704088#M238617</guid>
      <dc:creator>Athira</dc:creator>
      <dc:date>2024-11-11T13:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704251#M238656</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273872"&gt;@Athira&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;try to follow my approach using stats instead join applied to your conditions:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=source "status for : *   "Not available"  
| rex "status for : (?&amp;lt;ORDERS&amp;gt;.*?)" 
| append [ search 
     Message="Request for : *" 
     | rex "data=[A-Za-z0-9-]+\|(?P&amp;lt;ORDERS&amp;gt;[\w\.]+)" 
     | rex "\"unique\"\:\"(?P&amp;lt;UNIQUEID&amp;gt;[A-Z0-9]+)\""] 
| stats values(UNIQUEID) AS UNIQUEID BY ORDERS&lt;/LI-CODE&gt;&lt;P&gt;if you have more values for&amp;nbsp;UNIQUEID and you want a row foreach one, you can add the statement | mvexpand&amp;nbsp;UNIQUEID.&lt;/P&gt;&lt;P&gt;As I said, this solution has only one limit: the subsearch must return maximun 50,000 results.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 08:11:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704251#M238656</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-11-13T08:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704265#M238659</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; i tried your approach , i'm getting results&amp;nbsp;&lt;U&gt;&lt;SPAN&gt;&amp;nbsp;for&lt;/SPAN&gt;&amp;nbsp;all ORDERS.&amp;nbsp; i want only the ORDERS and UNIQUEID from subquery to be displayed&amp;nbsp; which matches the ORDERS (in the outer query)&amp;nbsp; those&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Not available&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 10:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704265#M238659</guid>
      <dc:creator>Athira</dc:creator>
      <dc:date>2024-11-13T10:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Join two logs in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704267#M238660</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273872"&gt;@Athira&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you should check the presence in bothe the searches, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=source "status for : *   "Not available"  
| rex "status for : (?&amp;lt;ORDERS&amp;gt;.*?)" 
| eval type="one"
| append [ search 
     Message="Request for : *" 
     | rex "data=[A-Za-z0-9-]+\|(?P&amp;lt;ORDERS&amp;gt;[\w\.]+)" 
     | rex "\"unique\"\:\"(?P&amp;lt;UNIQUEID&amp;gt;[A-Z0-9]+)\""
     | eval type="two" ] 
| stats 
     dc(type) AS type_count 
     values(UNIQUEID) AS UNIQUEID 
     BY ORDERS
| where type_count=2&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 11:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-logs-in-Splunk/m-p/704267#M238660</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-11-13T11:38:16Z</dc:date>
    </item>
  </channel>
</rss>

