<?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: Merging two searches without loosing main search data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/611041#M212474</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248907"&gt;@jeremyrenard&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Aug 2022 08:45:23 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-08-27T08:45:23Z</dc:date>
    <item>
      <title>How to merge two searches without losing main search data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610932#M212456</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am having some troubles to merge two searches and I am looking for the best way to do this.&amp;nbsp;&lt;BR /&gt;We have firewall traffic with NAT that is made on two levels. My goal is to be able to identify the flow with original and nated ip addresses. I explain :&lt;/P&gt;
&lt;P&gt;FW1 : src1,dst1,xlatesrc1,xlatedst1&lt;/P&gt;
&lt;P&gt;FW2 : src2 (=xlatescr1), dst2 (=xlatedst1), xlatedst2&lt;/P&gt;
&lt;P&gt;goal = table : src1,dst1,xlatesrc1,xlatedst1 (=xlatedst2 if it exists, xlatedst1 instead)&lt;BR /&gt;&lt;BR /&gt;I have made something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;search_FW1
| stats by src1,dst1,xlatesrc1,xlatedst1
| join left=[ search search_FW2
| stats values(xlatedst2) as xlatedst1 by src2]
| rename src2 as xlatesrc1
| table src1,dst1,xlatesrc1,xlatedst1&lt;/LI-CODE&gt;
&lt;P&gt;But I have noticed that if src2 does not exist in search_FW1, I loose the event from my main search (search_FW1) :(. I thought that the "left" parameter of "join" should solve the issue, but it does not...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea how to avoid it (and maybe optimize my search as I have seen that "join" has poor performance)?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 11:01:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610932#M212456</guid>
      <dc:creator>jeremyrenard</dc:creator>
      <dc:date>2022-08-26T11:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two searches without loosing main search data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610933#M212457</link>
      <description>Did this &lt;A href="https://community.splunk.com/t5/Splunk-Search/What-is-the-relation-between-the-Splunk-inner-left-join-and-the/m-p/391288/thread-id/113948" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/What-is-the-relation-between-the-Splunk-inner-left-join-and-the/m-p/391288/thread-id/113948&lt;/A&gt; helps you to format correctly your SPL?&lt;BR /&gt;r. Ismo</description>
      <pubDate>Fri, 26 Aug 2022 10:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610933#M212457</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-08-26T10:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two searches without loosing main search data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610943#M212461</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248907"&gt;@jeremyrenard&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you should try to use the eval-coalesce command and use stats instead join that's very slow, something like this:&lt;/P&gt;&lt;P&gt;At first you have to identify (from your shared search isn't possible) the joining key (present in both the searches) and use it in the stats command, if they are xlatesrc1 and xlatedst1, you could try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search_FW1&amp;gt; OR &amp;lt;search_FW2&amp;gt;
| eval 
   xlatesrc1=coalesce(xlatesrc1,src2), 
   xlatedst1=coalesce(xlatedst1, dst2)
| stats values(src1) AS src1 values(dst1) AS dst1 BY xlatesrc1 xlatedst1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 11:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610943#M212461</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-08-26T11:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge two searches without losing main search data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610959#M212464</link>
      <description>&lt;P&gt;Hello, thank you for your replies. I am working on it. I will let you know as soon as I have achieved what I att&lt;/P&gt;&lt;P&gt;empt to do &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 13:59:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610959#M212464</guid>
      <dc:creator>jeremyrenard</dc:creator>
      <dc:date>2022-08-26T13:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two searches without loosing main search data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610966#M212466</link>
      <description>&lt;P&gt;I have got it working (needed to add extra search to remove dupplicated "xlatesrc" values but work as a charm).&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 14:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/610966#M212466</guid>
      <dc:creator>jeremyrenard</dc:creator>
      <dc:date>2022-08-26T14:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two searches without loosing main search data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/611041#M212474</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248907"&gt;@jeremyrenard&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2022 08:45:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-searches-without-losing-main-search-data/m-p/611041#M212474</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-08-27T08:45:23Z</dc:date>
    </item>
  </channel>
</rss>

