<?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 Search two fields with same name but different values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-two-fields-with-same-name-but-different-values/m-p/376923#M169029</link>
    <description>&lt;P&gt;I'm trying to create a stats table in Splunk that shows the IP of VMs and the IP of the Host that supports those VMs.  Hosts and VMs have been indexed separately.  Both indexes have the same field name 'IP.'  &lt;/P&gt;

&lt;P&gt;(index="cms_vm") OR (index="cms_host") Host=$hostnamefield$ &lt;STRONG&gt;&lt;EM&gt;IP=$ipfield$&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;
| dedup VM &lt;BR /&gt;
| table VM IP MacAddress OperatingSystem_Code Cluster Host &lt;STRONG&gt;&lt;EM&gt;B&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;
| fields VM&lt;/P&gt;

&lt;P&gt;Where the last field  says 'B' I want to see the IP address of the Host, but because there's an IP field in the VM index nothing is returned.  Also I want the token to search the IP of the Host not the VM.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:56:38 GMT</pubDate>
    <dc:creator>gbwilson</dc:creator>
    <dc:date>2020-09-29T19:56:38Z</dc:date>
    <item>
      <title>Search two fields with same name but different values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-two-fields-with-same-name-but-different-values/m-p/376923#M169029</link>
      <description>&lt;P&gt;I'm trying to create a stats table in Splunk that shows the IP of VMs and the IP of the Host that supports those VMs.  Hosts and VMs have been indexed separately.  Both indexes have the same field name 'IP.'  &lt;/P&gt;

&lt;P&gt;(index="cms_vm") OR (index="cms_host") Host=$hostnamefield$ &lt;STRONG&gt;&lt;EM&gt;IP=$ipfield$&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;
| dedup VM &lt;BR /&gt;
| table VM IP MacAddress OperatingSystem_Code Cluster Host &lt;STRONG&gt;&lt;EM&gt;B&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;
| fields VM&lt;/P&gt;

&lt;P&gt;Where the last field  says 'B' I want to see the IP address of the Host, but because there's an IP field in the VM index nothing is returned.  Also I want the token to search the IP of the Host not the VM.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:56:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-two-fields-with-same-name-but-different-values/m-p/376923#M169029</guid>
      <dc:creator>gbwilson</dc:creator>
      <dc:date>2020-09-29T19:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Search two fields with same name but different values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-two-fields-with-same-name-but-different-values/m-p/376924#M169030</link>
      <description>&lt;P&gt;Something like this&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
(index="cms_vm") host=$hostnamefield$ IP=$ipfield$ | append [ (index="cms_host")  host=$hostnamefield$ IP=$ipfield$ | rename IP as host_ip] | stats values(IP) as VM_IP values(host_ip) as HOST_IP values(MacAddress) as  MacAddress values(OperatingSystem_Code ) as OperatingSystem_Code values(Cluster) as Cluster by host&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:56:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-two-fields-with-same-name-but-different-values/m-p/376924#M169030</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2020-09-29T19:56:40Z</dc:date>
    </item>
  </channel>
</rss>

