<?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 do i search two seperate indexes and then output values from fields returned from each index? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548824#M155704</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to search across two seperate indexes and then display fields returned from both indexes on a single line of my output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both indexes have a common field named "user" and I am search both indexes using this field.&lt;/P&gt;&lt;P&gt;The first part is "index=mcafee_wg&amp;nbsp;user= &lt;EM&gt;supplied value"&amp;nbsp;&amp;nbsp;&lt;/EM&gt;I want to search this&amp;nbsp; index for a given value for "user" field and to display the value of a field named "url" in my output. "url" is a field in this index.&lt;/P&gt;&lt;P&gt;I also want to search a different index with "index=cisco_fmc&amp;nbsp;user= &lt;EM&gt;supplied v&lt;/EM&gt;&lt;EM&gt;alue"&amp;nbsp;&lt;/EM&gt;&amp;nbsp;As above, I want to search this index for a given value for "user" field. From this index I want to display the value of a field named "detection" which is a field in this index.&lt;/P&gt;&lt;P&gt;So basically i want to combine these three fields together and output them on the same line, such as:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;user&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;url&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;detection&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;value&amp;nbsp; &amp;nbsp; &amp;nbsp; value&amp;nbsp; &amp;nbsp; &amp;nbsp;value&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 16:07:37 GMT</pubDate>
    <dc:creator>ezmo1982</dc:creator>
    <dc:date>2021-04-21T16:07:37Z</dc:date>
    <item>
      <title>How do i search two seperate indexes and then output values from fields returned from each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548824#M155704</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to search across two seperate indexes and then display fields returned from both indexes on a single line of my output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both indexes have a common field named "user" and I am search both indexes using this field.&lt;/P&gt;&lt;P&gt;The first part is "index=mcafee_wg&amp;nbsp;user= &lt;EM&gt;supplied value"&amp;nbsp;&amp;nbsp;&lt;/EM&gt;I want to search this&amp;nbsp; index for a given value for "user" field and to display the value of a field named "url" in my output. "url" is a field in this index.&lt;/P&gt;&lt;P&gt;I also want to search a different index with "index=cisco_fmc&amp;nbsp;user= &lt;EM&gt;supplied v&lt;/EM&gt;&lt;EM&gt;alue"&amp;nbsp;&lt;/EM&gt;&amp;nbsp;As above, I want to search this index for a given value for "user" field. From this index I want to display the value of a field named "detection" which is a field in this index.&lt;/P&gt;&lt;P&gt;So basically i want to combine these three fields together and output them on the same line, such as:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;user&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;url&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;detection&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;value&amp;nbsp; &amp;nbsp; &amp;nbsp; value&amp;nbsp; &amp;nbsp; &amp;nbsp;value&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 16:07:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548824#M155704</guid>
      <dc:creator>ezmo1982</dc:creator>
      <dc:date>2021-04-21T16:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do i search two seperate indexes and then output values from fields returned from each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548826#M155705</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=mcafee_wg OR index=cisco_fmc user="supplied value"
| stats values(url) as url values(detection) as detection by user&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Apr 2021 16:14:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548826#M155705</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-21T16:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do i search two seperate indexes and then output values from fields returned from each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548827#M155706</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225682"&gt;@ezmo1982&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the user field needs to have the same values across the two indexes?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 16:17:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548827#M155706</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-04-21T16:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do i search two seperate indexes and then output values from fields returned from each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548828#M155707</link>
      <description>&lt;P&gt;Yes, the value of the user field needs to be the same across both indexes.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 16:19:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548828#M155707</guid>
      <dc:creator>ezmo1982</dc:creator>
      <dc:date>2021-04-21T16:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do i search two seperate indexes and then output values from fields returned from each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548834#M155708</link>
      <description>&lt;P&gt;you can try&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=mcafee_wg user= supplied value") | join user[search index=cisco_fmc user= supplied value"] | table user url detection&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;be careful because splunk join comand works fine with a small set of data.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 16:49:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548834#M155708</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-04-21T16:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do i search two seperate indexes and then output values from fields returned from each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548849#M155710</link>
      <description>&lt;P&gt;One thing I forgot to mention is that both indexes contain a field named "url". I am looking to output the "url" field from just the mcafee_wg index and not the cisco_fmc index.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 18:28:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548849#M155710</guid>
      <dc:creator>ezmo1982</dc:creator>
      <dc:date>2021-04-21T18:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do i search two seperate indexes and then output values from fields returned from each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548864#M155713</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=mcafee_wg OR index=cisco_fmc user="supplied value"
| eval url=if(index="mcafee_wg", url, null)
| stats values(url) as url values(detection) as detection by user&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Apr 2021 21:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-search-two-seperate-indexes-and-then-output-values-from/m-p/548864#M155713</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-21T21:00:35Z</dc:date>
    </item>
  </channel>
</rss>

