<?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 compare values from two different searches and return the results if the values are equal in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289889#M165765</link>
    <description>&lt;P&gt;Thanks a lot, I am getting the list, but is there any way to get the full logs because i want to check the hostname on each of the search result to check how many requests are hitting each server for the matched xCoord and yCoord as the application is deployed on 3 servers. &lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2017 18:33:49 GMT</pubDate>
    <dc:creator>manojnelakurthi</dc:creator>
    <dc:date>2017-10-06T18:33:49Z</dc:date>
    <item>
      <title>how to compare values from two different searches and return the results if the values are equal</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289887#M165763</link>
      <description>&lt;P&gt;I have 2 searches &lt;BR /&gt;
Search1:&lt;BR /&gt;
index=i_temp source=&lt;EM&gt;source1&lt;/EM&gt; &lt;BR /&gt;
Results:&lt;BR /&gt;
xCoord=1155276.2781774567 yCoord=1885220.7999824171&lt;BR /&gt;
xCoord=1144751.2989115883 yCoord=1919044.2279770568&lt;/P&gt;

&lt;P&gt;Search2:&lt;BR /&gt;
index=i_production source=&lt;EM&gt;feed&lt;/EM&gt; &lt;BR /&gt;
Results:&lt;BR /&gt;
xCoord=1155276.2781774567 yCoord=1885220.799982417&lt;/P&gt;

&lt;P&gt;I want to compare both the search results and return the results if the string xCoord=1155276.2781774567 yCoord=1885220.7999824171 is same in both the searches. In reality the results for bot the searches are larger in number.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 17:21:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289887#M165763</guid>
      <dc:creator>manojnelakurthi</dc:creator>
      <dc:date>2017-10-06T17:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to compare values from two different searches and return the results if the values are equal</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289888#M165764</link>
      <description>&lt;P&gt;Try this (gives list of xCoord and yCoord which are common in both indexes/sources)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=i_temp source=*source1*)  OR (index=i_production source=*feed* )
| stats dc(index) as indexes by xCoord yCoord 
| where indexes=2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Oct 2017 17:26:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289888#M165764</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-10-06T17:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to compare values from two different searches and return the results if the values are equal</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289889#M165765</link>
      <description>&lt;P&gt;Thanks a lot, I am getting the list, but is there any way to get the full logs because i want to check the hostname on each of the search result to check how many requests are hitting each server for the matched xCoord and yCoord as the application is deployed on 3 servers. &lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 18:33:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289889#M165765</guid>
      <dc:creator>manojnelakurthi</dc:creator>
      <dc:date>2017-10-06T18:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to compare values from two different searches and return the results if the values are equal</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289890#M165766</link>
      <description>&lt;P&gt;You can do something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (index=i_temp source=*source1*)  OR (index=i_production source=*feed* )
 | eval Field1=case(index=i_production,Field1)
 | eval TempTime=case(index=i_temp,_time)
 | eval ProdTime=case(index=i_production,_time)
 | fields xCoord yCoord ProdTime TempTime ...any other fields we want to keep...
 | stats values(*) as * by xCoord yCoord 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want a field with a particular name from one index, but not from the other, then you do something like the &lt;CODE&gt;eval Field1&lt;/CODE&gt; line. If you need both and you need to know which is which, then use something like the  &lt;CODE&gt;eval TempTime/prodTime&lt;/CODE&gt; lines. &lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 21:04:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-values-from-two-different-searches-and-return-the/m-p/289890#M165766</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-06T21:04:59Z</dc:date>
    </item>
  </channel>
</rss>

