<?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 Results from 3 Searches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21112#M3414</link>
    <description>&lt;P&gt;Yes,&lt;/P&gt;

&lt;P&gt;Finally got it. Many many thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2011 03:31:52 GMT</pubDate>
    <dc:creator>welkinson</dc:creator>
    <dc:date>2011-11-29T03:31:52Z</dc:date>
    <item>
      <title>Merging Results from 3 Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21107#M3409</link>
      <description>&lt;P&gt;Hi I have 3 searches from 3 different device, I would like to have 1 report which contains data from the the 3 devices into 1 line.  I am tracking a user who plugs his pc to a switch which in turn asks the DHCP server to assign an IP address to him a role will then be assigned to him by an app server.  I want to match the MAC address from logs of the switch to the Mac address from the logs in the DHCP then match the IP address from the DHCP logs to the IP Adress in the App server log.  Is this possible?  Thanks in advance!&lt;/P&gt;

&lt;P&gt;Switch:  Switch MAC Address  &amp;amp; Local Port&lt;/P&gt;

&lt;P&gt;DHCP:   MAC Address  &amp;amp; IP Address&lt;/P&gt;

&lt;P&gt;App Server:  IP Address  &amp;amp;  Role&lt;/P&gt;

&lt;P&gt;Report will have :&lt;/P&gt;

&lt;P&gt;MAC Address       IP Address      Role  in 1 Line&lt;/P&gt;

&lt;P&gt;Edit:&lt;BR /&gt;
Here are the three searches:&lt;/P&gt;

&lt;P&gt;host="10.21.10.23" | rex field=_raw "for client &lt;A href="https://community.splunk.com/?%3Cswitch_mac1%3E.*" target="_blank"&gt;(&lt;/A&gt;&lt;A href="https://community.splunk.com/?%3Cswitch_mac2%3E.*" target="_blank"&gt;.&lt;/A&gt;&lt;A href="https://community.splunk.com/?%3Cswitch_mac3%3E.*" target="_blank"&gt;.&lt;/A&gt;[)] on Interface&lt;A href="https://community.splunk.com/?%3CIPort%3E.*" target="_blank"&gt; &lt;/A&gt;[ ]" | eval switch_mac=switch_mac1.switch_mac2.switch_mac3 | stats count by switch_mac IPort&lt;/P&gt;

&lt;P&gt;(host="10.21.10.8" OR host="10.21.10.7") "10.21.23" | rex field=_raw "IP address (?&lt;IPADR&gt;.&lt;EM&gt;) is assigned to (?&lt;MAC_ADR&gt;.&lt;/MAC_ADR&gt;&lt;/EM&gt;)[.] &lt;A href="https://community.splunk.com/?%3Cagn_time%3E.*" target="_blank"&gt;(&lt;/A&gt;[)]" | stats count by Mac_adr, IPadr&lt;/IPADR&gt;&lt;/P&gt;

&lt;P&gt;(host="10.21.10.3" OR host="10.21.10.4") "10.21.23" | rex field=_raw " on host (?&lt;CLIENTPC&gt;.&lt;EM&gt;) changed from &amp;lt;(?&lt;FROMROLE&gt;.&lt;/FROMROLE&gt;&lt;/EM&gt;)&amp;gt; to &amp;lt;(?&lt;TOROLE&gt;.*)&amp;gt;" | stats count by clientpc, FromRole, ToRole&lt;/TOROLE&gt;&lt;/CLIENTPC&gt;&lt;/P&gt;

&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:08:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21107#M3409</guid>
      <dc:creator>welkinson</dc:creator>
      <dc:date>2020-09-28T10:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Results from 3 Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21108#M3410</link>
      <description>&lt;P&gt;Assuming you have the appropriate fields extracted, you should be able to use the transaction command:&lt;/P&gt;

&lt;P&gt;sourcetype=Switch OR sourcetype=DHCP OR sourcetype=Appsvr | transaction MacAddress IPAddress | table MacAddress IPAddress Role&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2011 12:59:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21108#M3410</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2011-11-23T12:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Results from 3 Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21109#M3411</link>
      <description>&lt;P&gt;Hi Thanks for your answer, what do you mean by appropriate fields extracted. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2011 14:58:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21109#M3411</guid>
      <dc:creator>welkinson</dc:creator>
      <dc:date>2011-11-24T14:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Results from 3 Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21110#M3412</link>
      <description>&lt;P&gt;Your searches results depend on having certain fields (MacAddress, IPAddress, Role).  Fields can be automatically extracted by Splunk at search time based on key-value pairs in the logs events.  Or they can be extracted explicitly by editing props.conf (and transforms.conf if necessary).&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2011 15:03:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21110#M3412</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2011-11-24T15:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Results from 3 Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21111#M3413</link>
      <description>&lt;P&gt;Assuming clientpc is an IPAddress, I would try the append command to gather the events from your 3 searches and then pipe to the transaction command to correlate.  In order for the transaction command to correlate based on field names, you need to change "clientpc" to "IPadr" and also change "switch_mac" to "Mac_adr". (Make sure the spelling of the Ip address and Mac address fields match.) Include your 3 searches (without the stats commands) in the framework below:&lt;/P&gt;

&lt;P&gt;"Your first search"&lt;/P&gt;

&lt;P&gt;| append&lt;BR /&gt;
[search "Your second search"]&lt;/P&gt;

&lt;P&gt;| append&lt;BR /&gt;
[search "Your third search"]&lt;/P&gt;

&lt;P&gt;| transaction Mac_adr IPadr&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21111#M3413</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2020-09-28T10:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Results from 3 Searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21112#M3414</link>
      <description>&lt;P&gt;Yes,&lt;/P&gt;

&lt;P&gt;Finally got it. Many many thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2011 03:31:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merging-Results-from-3-Searches/m-p/21112#M3414</guid>
      <dc:creator>welkinson</dc:creator>
      <dc:date>2011-11-29T03:31:52Z</dc:date>
    </item>
  </channel>
</rss>

