<?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 search for matching fields using 2 different host with same sourcetype? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-matching-fields-using-2-different-host-with/m-p/359459#M65587</link>
    <description>&lt;P&gt;Try this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=pan (host=1 OR host=2)
| fields host action src dest
| eval time1=case(host="1",_time) 
| eval time2=case(host="2",_time) 
| eval src1=case(host="1",src) 
| eval src2=case(host="2",src) 
| eval dest1=case(host="1",dest) 
| eval dest2=case(host="2",dest) 
| stats values(time*) as time* values(dest*) as dest* values(src*) as src* values(host) as host by action
| where mvcount(host)&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 26 Sep 2017 19:46:30 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-09-26T19:46:30Z</dc:date>
    <item>
      <title>How to search for matching fields using 2 different host with same sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-matching-fields-using-2-different-host-with/m-p/359458#M65586</link>
      <description>&lt;P&gt;I'm looking to find matching field (lets call this field action) from 2 different host with the same sourcetype.&lt;/P&gt;

&lt;P&gt;example Sourcetype=pan host=1 and host=2 &lt;/P&gt;

&lt;P&gt;I'm looking to create a ta table that would show the matching field for field action (I only want the matching field to generate result)&lt;/P&gt;

&lt;P&gt;so if host 1 has action=allowed and host 2 has action=allowed. I want to create a table that would include the time, action, src, dest.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 17:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-matching-fields-using-2-different-host-with/m-p/359458#M65586</guid>
      <dc:creator>mrtolu6</dc:creator>
      <dc:date>2017-09-26T17:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for matching fields using 2 different host with same sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-matching-fields-using-2-different-host-with/m-p/359459#M65587</link>
      <description>&lt;P&gt;Try this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=pan (host=1 OR host=2)
| fields host action src dest
| eval time1=case(host="1",_time) 
| eval time2=case(host="2",_time) 
| eval src1=case(host="1",src) 
| eval src2=case(host="2",src) 
| eval dest1=case(host="1",dest) 
| eval dest2=case(host="2",dest) 
| stats values(time*) as time* values(dest*) as dest* values(src*) as src* values(host) as host by action
| where mvcount(host)&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Sep 2017 19:46:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-matching-fields-using-2-different-host-with/m-p/359459#M65587</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-26T19:46:30Z</dc:date>
    </item>
  </channel>
</rss>

