<?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: How to efficiently show the difference between two fields from different sources in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558096#M158510</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236033"&gt;@nathg123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share some events and the expectations from that samples?&lt;/P&gt;&lt;P&gt;KV&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jul 2021 06:05:23 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2021-07-02T06:05:23Z</dc:date>
    <item>
      <title>How to efficiently show the difference between two fields from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558089#M158509</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;Here is my search&lt;BR /&gt;&lt;BR /&gt;index=main event_simpleName=NeighborListIP4 OR event_simpleName=SensorHeartbeat&lt;BR /&gt;| rex field=NeighborList "(?&amp;lt;MAC1&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;"&lt;BR /&gt;| rex field=NeighborList "(?&amp;lt;MAC1&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC2&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;"&lt;BR /&gt;| rex field=NeighborList "(?&amp;lt;MAC1&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC2&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC3&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;"&lt;BR /&gt;| rex field=NeighborList "(?&amp;lt;MAC1&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC2&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC3&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC4&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC5&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;"&lt;BR /&gt;| rex field=NeighborList "(?&amp;lt;MAC1&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC2&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC3&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC4&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC5&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;.*?(?&amp;lt;MAC6&amp;gt;.................)\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|0\|.*;"&lt;BR /&gt;| eval Combiner = mvappend('MAC1', 'MAC2', 'MAC3', 'MAC4', 'MAC5', 'MAC6')&lt;BR /&gt;| mvexpand Combiner&lt;BR /&gt;| dedup Combiner&lt;BR /&gt;| table Combiner&lt;/P&gt;&lt;P&gt;I want to show what is in the Combiner field but not present within the MAC field &lt;STRONG&gt;only &lt;/STRONG&gt;inside event_simpleName=SensorHeartbeat MAC=*&lt;BR /&gt;&lt;BR /&gt;However both event_simpleName=NeighborListIP4 and event_simpleName=SensorHeartbeat contain the field name MAC.&lt;/P&gt;&lt;P&gt;Not sure what is the most efficient way of doing this is, I was attempting to use diff command however no luck.&lt;/P&gt;&lt;P&gt;Any help would be much appreciated!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 05:44:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558089#M158509</guid>
      <dc:creator>nathg123</dc:creator>
      <dc:date>2021-07-02T05:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to efficiently show the difference between two fields from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558096#M158510</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236033"&gt;@nathg123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share some events and the expectations from that samples?&lt;/P&gt;&lt;P&gt;KV&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 06:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558096#M158510</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-02T06:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to efficiently show the difference between two fields from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558103#M158513</link>
      <description>&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939" target="_blank" rel="noopener"&gt;@kamlesh_vaghela&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;I have the field "&lt;SPAN&gt;Combiner"&amp;nbsp;within&amp;nbsp;event_simpleName=NeighborListIP4&lt;BR /&gt;I have the field "MAC" within&amp;nbsp;event_simpleName=SensorHeartbeat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Both fields contains MAC address's, I want to output what's in&amp;nbsp;&lt;SPAN&gt;Combiner but not in&amp;nbsp;MAC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However&amp;nbsp;&lt;SPAN&gt;event_simpleName=NeighborListIP4 also has the field MAC, which I want to completely disregard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sorry its difficult to explain, I hope this clears it up!&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&lt;SPAN&gt;event_simpleName=NeighborListIP4 Combiner&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;SPAN&gt;event_simpleName=SensorHeartbeat&lt;BR /&gt;MAC&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Give me value of&amp;nbsp;&lt;SPAN&gt;Combiner&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Don't give me the value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;Give me value of&amp;nbsp;&lt;SPAN&gt;Combiner&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-panel lia-panel-standard MessageTagsTaplet Chrome lia-component-message-view-widget-tags"&gt;&lt;DIV class="lia-decoration-border"&gt;&lt;DIV class="lia-decoration-border-top"&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-decoration-border-content"&gt;&lt;DIV&gt;&lt;DIV class="lia-panel-content-wrapper"&gt;&lt;DIV class="lia-panel-content"&gt;&lt;DIV class="AddMessageTags lia-message-tags"&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558100#" target="_blank" rel="noopener"&gt;Add tags&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Jul 2021 06:24:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558103#M158513</guid>
      <dc:creator>nathg123</dc:creator>
      <dc:date>2021-07-02T06:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to efficiently show the difference between two fields from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558106#M158514</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236033"&gt;@nathg123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes it's difficult. &amp;nbsp;let me share what I've tried. I'm not what search you design in earlier post. But&amp;nbsp;can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main event_simpleName=NeighborListIP4 OR event_simpleName=SensorHeartbeat 
| eval MAC=if(event_simpleName=NeighborListIP4,null(),MAC)
| eventstats values(MAC) as Macs
| eval flg=mvfind(Macs,Combiner)
| where isnull(flg)
| dedup  Combiner
| table Combiner&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval raw="event_simpleName=NeighborListIP4&amp;amp;Combiner=1,4,5|event_simpleName=SensorHeartbeat&amp;amp;MAC=4,4,7",raw=split(raw,"|")| mvexpand raw | rename raw as _raw
| extract kvdelim="=" pairdelim="&amp;amp;" | eval Combiner=split(Combiner,","),MAC=split(MAC,",") | mvexpand Combiner | mvexpand MAC
| rename comment as "Up to now is data only"
| eval MAC=if(event_simpleName=NeighborListIP4,null(),MAC)
| eventstats values(MAC) as Macs
| eval flg=mvfind(Macs,Combiner)
| where isnull(flg)
| dedup  Combiner
| table Combiner&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 06:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-efficiently-show-the-difference-between-two-fields-from/m-p/558106#M158514</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-02T06:56:19Z</dc:date>
    </item>
  </channel>
</rss>

