<?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: Search for the events with the same IP with two different field names from the two different index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419621#M120663</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index = intrusion dest_ip) AND [search index = proxy r_ip | table r_ip | rename dest_ip AS r_ip]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index = intrusion dest_ip) OR (index = proxy r_ip)
| eval dest_ip = coalesce(dest_ip, r_ip)
| stats dc(sourcetype) AS sourcetypeCount values(sourcetype) AS sourcetypes BY dest_ip
| where sourcetypeCount==2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Feb 2019 05:47:43 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-02-12T05:47:43Z</dc:date>
    <item>
      <title>Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419612#M120654</link>
      <description>&lt;P&gt;(index = intrusion dest_ip) OR  (index = proxy r_ip)&lt;BR /&gt;
dest_ip should always be equal to r_ip&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419612#M120654</guid>
      <dc:creator>staparia</dc:creator>
      <dc:date>2020-09-29T22:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419613#M120655</link>
      <description>&lt;P&gt;You could use &lt;CODE&gt;join&lt;/CODE&gt;, but that's inefficient.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=intrusion dest_ip=* | join dest_ip [search index=proxy r_ip=* | rename r_ip as dest_ip]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;A better way is to use &lt;CODE&gt;stats&lt;/CODE&gt;.  Replace 'some_field' with a field name from your events.  Add more 'some_field' arguments as needed for all the events you wish to see.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=intrusion dest_ip=*) OR (index=proxy r_ip=*) | eval ip=coalesce(dest_ip, r_ip) 
| stats values(some_field) as some_field by ip
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:53:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419613#M120655</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-29T22:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419614#M120656</link>
      <description>&lt;P&gt;Hello, the stas query is giving me entire set of results. Whereas i wanted a query where if an IP 10.10.10.10 is involved --&amp;gt; it should return results in such a manner this particular IP (10.10.10.10) is present in both search queries ; that is &lt;/P&gt;

&lt;P&gt;Query 1 --&amp;gt;  (index=intrusion dest_ip=&lt;EM&gt;)&lt;BR /&gt;
Query 2 --&amp;gt; (index=proxy r_ip=&lt;/EM&gt;)&lt;/P&gt;

&lt;P&gt;where r_ip and dest_ip = 10.10.10.10&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419614#M120656</guid>
      <dc:creator>staparia</dc:creator>
      <dc:date>2020-09-29T22:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419615#M120657</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
 i wanted all the events in such a manner where if dest_ip = 10.10.10.10 and r_ip = 10.10.10.10...&lt;/P&gt;

&lt;P&gt;Both the values are same and matching  &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419615#M120657</guid>
      <dc:creator>staparia</dc:creator>
      <dc:date>2020-09-29T22:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419616#M120658</link>
      <description>&lt;P&gt;I would seek results wherein r_ip=dest_ip . Example  r_ip=10.10.10.10 and dest_ip=10.10.10.10 . So i would want only those results when these two fields have same values&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:53:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419616#M120658</guid>
      <dc:creator>staparia</dc:creator>
      <dc:date>2020-09-29T22:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419617#M120659</link>
      <description>&lt;P&gt;Please share your query.  Perhaps there is an error preventing the expected results.&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;by&lt;/CODE&gt; clause of the &lt;CODE&gt;stats&lt;/CODE&gt; command groups events that have the same value in the 'ip' (in this case) field.  &lt;/P&gt;

&lt;P&gt;If you're not happy with the results of the &lt;CODE&gt;stats&lt;/CODE&gt; command, try my &lt;CODE&gt;join&lt;/CODE&gt; example.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 16:25:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419617#M120659</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-01-21T16:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419618#M120660</link>
      <description>&lt;P&gt;(index=intrusion attack_signature=MS-Executable-File destination_port=80 direction=Outbound result_status=Inconclusive) OR (index=proxy x_exception_id!=IT-HotSpot-Denied AND cs_host!="testrating.webfilter.bluecoat.com" cs_host!="help.tower.shanhu99.com" cs_categories="none" url=*.php) | eval ip=coalesce(dest_ip, r_ip) | stats count by ip&lt;/P&gt;

&lt;P&gt;It is giving me results of the values of the IP which is present in in both the indexes.. but not looking at the condition where i want dest_ip=r_ip&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:53:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419618#M120660</guid>
      <dc:creator>staparia</dc:creator>
      <dc:date>2020-09-29T22:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419619#M120661</link>
      <description>&lt;P&gt;Have you tried using &lt;CODE&gt;join&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 13:45:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419619#M120661</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-01-23T13:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419620#M120662</link>
      <description>&lt;P&gt;i did. didnt show the results as expected. &lt;/P&gt;

&lt;P&gt;suppose index=proxy AND s_ip="some value"&lt;BR /&gt;
index=ips AND d_ip="some value"&lt;/P&gt;

&lt;P&gt;now i would seek raw logs with all the fields (containing both the indexes)  matching the values of s_ip and d_ip&lt;/P&gt;

&lt;P&gt;suppose if i enter 10.10.10.10 (be it s_ip or d_ip), it gives me results of all the logs present in the index --&amp;gt;proxy and index--&amp;gt; ips&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:15:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419620#M120662</guid>
      <dc:creator>staparia</dc:creator>
      <dc:date>2020-09-29T23:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Search for the events with the same IP with two different field names from the two different index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419621#M120663</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index = intrusion dest_ip) AND [search index = proxy r_ip | table r_ip | rename dest_ip AS r_ip]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index = intrusion dest_ip) OR (index = proxy r_ip)
| eval dest_ip = coalesce(dest_ip, r_ip)
| stats dc(sourcetype) AS sourcetypeCount values(sourcetype) AS sourcetypes BY dest_ip
| where sourcetypeCount==2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Feb 2019 05:47:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-the-events-with-the-same-IP-with-two-different-field/m-p/419621#M120663</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-12T05:47:43Z</dc:date>
    </item>
  </channel>
</rss>

