<?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 How to search for same field with different ip address? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-same-field-with-different-ip-address/m-p/626382#M217714</link>
    <description>&lt;P&gt;Happy New Year to all of you.&lt;/P&gt;
&lt;P&gt;So I have syslog in which we have details of the devices and switches.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The requirement is to find the old and new ip address for the NetworkName which were recently added to a group.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To get this i have to follow below steps.&lt;/P&gt;
&lt;P&gt;1. get the NetworkName which has been recently added to group.&lt;BR /&gt;&lt;BR /&gt;2. than get the latest CallingStation for the&amp;nbsp;NetworkName .&lt;/P&gt;
&lt;P&gt;# search for step 1 &amp;amp; 2&lt;BR /&gt;index=xyz NetworkGroups="Device Type#All Device Types#DNAC#SingleIONBranch" (Diag_Message="Authentication succeeded") NetworkName =USAZSLKRR01FIF0001&lt;BR /&gt;|stats latest(CallingStation ) as CallingStation by NetworkName&lt;/P&gt;
&lt;P&gt;3. search in the index with the&amp;nbsp;CallingStation&amp;nbsp; to get IPAddress(it has to ran for last 24 hours)&lt;/P&gt;
&lt;P&gt;index=na3rc Calling_Station_ID=B0-22-7A-32-32-26&lt;BR /&gt;| bin span=1d _time&lt;BR /&gt;| stats latest(IPAddress) as IPAddress by _time CallingStation&lt;BR /&gt;| eval IP=if(_time&amp;lt;relative_time(now(),"@d"),"Old","New")&lt;BR /&gt;&lt;BR /&gt;The problem here is that IPAddress field has both old and new IPAddress.&lt;BR /&gt;&lt;BR /&gt;I tried join but it is showing no results as it is being maxout and when i try to use it in same search it is only showing new IPAddress.&lt;BR /&gt;&lt;BR /&gt;Thank in Advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=xyz NetworkGroups="Device Type#All Device Types#DNAC#SingleIONBranch" (Diag_Message="Authentication succeeded") NetworkName=USAZSLKRR01FIF0001
| stats latest(CallingStation) as CallingStation  by NetworkName
| join CallingStation type=left [| search index=xyz
| bin span=1d _time 
| stats latest(IPAddress) as IPAddress by  _time CallingStation 
| eval IP=if(_time&amp;lt;relative_time(now(),"@d"),"Old","New")]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2023 16:31:19 GMT</pubDate>
    <dc:creator>niks987</dc:creator>
    <dc:date>2023-01-09T16:31:19Z</dc:date>
    <item>
      <title>How to search for same field with different ip address?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-same-field-with-different-ip-address/m-p/626382#M217714</link>
      <description>&lt;P&gt;Happy New Year to all of you.&lt;/P&gt;
&lt;P&gt;So I have syslog in which we have details of the devices and switches.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The requirement is to find the old and new ip address for the NetworkName which were recently added to a group.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To get this i have to follow below steps.&lt;/P&gt;
&lt;P&gt;1. get the NetworkName which has been recently added to group.&lt;BR /&gt;&lt;BR /&gt;2. than get the latest CallingStation for the&amp;nbsp;NetworkName .&lt;/P&gt;
&lt;P&gt;# search for step 1 &amp;amp; 2&lt;BR /&gt;index=xyz NetworkGroups="Device Type#All Device Types#DNAC#SingleIONBranch" (Diag_Message="Authentication succeeded") NetworkName =USAZSLKRR01FIF0001&lt;BR /&gt;|stats latest(CallingStation ) as CallingStation by NetworkName&lt;/P&gt;
&lt;P&gt;3. search in the index with the&amp;nbsp;CallingStation&amp;nbsp; to get IPAddress(it has to ran for last 24 hours)&lt;/P&gt;
&lt;P&gt;index=na3rc Calling_Station_ID=B0-22-7A-32-32-26&lt;BR /&gt;| bin span=1d _time&lt;BR /&gt;| stats latest(IPAddress) as IPAddress by _time CallingStation&lt;BR /&gt;| eval IP=if(_time&amp;lt;relative_time(now(),"@d"),"Old","New")&lt;BR /&gt;&lt;BR /&gt;The problem here is that IPAddress field has both old and new IPAddress.&lt;BR /&gt;&lt;BR /&gt;I tried join but it is showing no results as it is being maxout and when i try to use it in same search it is only showing new IPAddress.&lt;BR /&gt;&lt;BR /&gt;Thank in Advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=xyz NetworkGroups="Device Type#All Device Types#DNAC#SingleIONBranch" (Diag_Message="Authentication succeeded") NetworkName=USAZSLKRR01FIF0001
| stats latest(CallingStation) as CallingStation  by NetworkName
| join CallingStation type=left [| search index=xyz
| bin span=1d _time 
| stats latest(IPAddress) as IPAddress by  _time CallingStation 
| eval IP=if(_time&amp;lt;relative_time(now(),"@d"),"Old","New")]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 16:31:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-same-field-with-different-ip-address/m-p/626382#M217714</guid>
      <dc:creator>niks987</dc:creator>
      <dc:date>2023-01-09T16:31:19Z</dc:date>
    </item>
  </channel>
</rss>

