<?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 pass list of values from the  first search into the second search ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233538#M69352</link>
    <description>&lt;P&gt;Thanks so much for trying to help me !!! &lt;BR /&gt;
I did try both of the queries but still getting incorrect results : it shows only the very first name (value) from the generated list from hardware_inventory. Somehow it is only passing one, not multiple values to the software_inventory.&lt;/P&gt;

&lt;P&gt;Somehow I need to pass OR after each value name in order to get the right results&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:37:56 GMT</pubDate>
    <dc:creator>raylex_splunk_d</dc:creator>
    <dc:date>2020-09-29T09:37:56Z</dc:date>
    <item>
      <title>How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233531#M69345</link>
      <description>&lt;P&gt;Here is what I do to get required search results using two separate searches:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;SEARCH#1&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I use the following query &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=hardware_inventory vendor=hp AND  env=prod |dedup ServerName|table ServerName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In order to generate statistical table containing single column list  of names of the servers:&lt;/P&gt;

&lt;P&gt;servername1&lt;BR /&gt;
servername2&lt;BR /&gt;
servername3&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;SEARCH#2&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I use the following query to generate search results  using the names I obtained earlier in &lt;STRONG&gt;SEARCH#1&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=software_inventory servername1 OR servername2 OR servername3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It is an easy task if you have 3 servers, but it is not if you have 500&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;QUESTION:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;How do I combine these two searches into one so I don't have to put server names manually into second search?&lt;/P&gt;

&lt;P&gt;Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 15:10:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233531#M69345</guid>
      <dc:creator>raylex_splunk_d</dc:creator>
      <dc:date>2016-05-06T15:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233532#M69346</link>
      <description>&lt;P&gt;Assuming the software inventory index contains field extractions for the server names and the field is called servername...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=software_inventory [search  index=hardware_inventory vendor=hp AND  env=prod |dedup ServerName|table ServerName] | search servername=ServerName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or maybe it's just as easy as this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=software_inventory [search  index=hardware_inventory vendor=hp AND  env=prod |dedup ServerName|table ServerName] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not very awesome at subsearches...&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2016 02:00:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233532#M69346</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-07T02:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233533#M69347</link>
      <description>&lt;P&gt;Converted to an Answer, because it is one.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2016 02:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233533#M69347</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-05-07T02:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233534#M69348</link>
      <description>&lt;P&gt;Thanks so much for your response!&lt;/P&gt;

&lt;P&gt;I tried both methods but it doesn't work the same way as it does when manually putting "ServerName" values into the search.&lt;/P&gt;

&lt;P&gt;Field  ServerName  does exist.  In my example "servername1..2" in lower case is actual  value of the  ServerName  filed.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 13:16:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233534#M69348</guid>
      <dc:creator>raylex_splunk_d</dc:creator>
      <dc:date>2016-05-09T13:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233535#M69349</link>
      <description>&lt;P&gt;Does the ServerName field exist in the software_inventory index?&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 13:22:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233535#M69349</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-09T13:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233536#M69350</link>
      <description>&lt;P&gt;&lt;STRONG&gt;ServerName&lt;/STRONG&gt; field does not exist in &lt;STRONG&gt;software_inventory index&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;However,  values (servername1, servername2, servername3..) do exist in &lt;STRONG&gt;software_inventory index&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;Basically what I am doing is extracting list of server names from &lt;STRONG&gt;hardware_inventory index&lt;/STRONG&gt; and then use this list of names  to extract all data, associated with these names  from &lt;STRONG&gt;software_inventory index&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 14:02:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233536#M69350</guid>
      <dc:creator>raylex_splunk_d</dc:creator>
      <dc:date>2016-05-09T14:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233537#M69351</link>
      <description>&lt;P&gt;That's why i mentioned the assumption, and it certainly changes the answer &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=software_inventory [ search index=hardware_inventory vendor=hp env=prod | dedup ServerName | table ServerName | rename ServerName as search ] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or use return command instead of rename:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=software_inventory [ search index=hardware_inventory vendor=hp env=prod | dedup ServerName | table ServerName | return $ServerName ] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 May 2016 15:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233537#M69351</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-09T15:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233538#M69352</link>
      <description>&lt;P&gt;Thanks so much for trying to help me !!! &lt;BR /&gt;
I did try both of the queries but still getting incorrect results : it shows only the very first name (value) from the generated list from hardware_inventory. Somehow it is only passing one, not multiple values to the software_inventory.&lt;/P&gt;

&lt;P&gt;Somehow I need to pass OR after each value name in order to get the right results&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:37:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233538#M69352</guid>
      <dc:creator>raylex_splunk_d</dc:creator>
      <dc:date>2020-09-29T09:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233539#M69353</link>
      <description>&lt;P&gt;If I  can make  query :&lt;/P&gt;

&lt;P&gt;index=software_inventory [ search index=hardware_inventory vendor=hp env=prod | dedup ServerName | table ServerName | rename ServerName as search ] &lt;/P&gt;

&lt;P&gt;to return events for more than one value I think that would do it !&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:39:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233539#M69353</guid>
      <dc:creator>raylex_splunk_d</dc:creator>
      <dc:date>2020-09-29T09:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233540#M69354</link>
      <description>&lt;P&gt;&lt;CODE&gt;index=software_inventory [ search index=hardware_inventory vendor=hp env=prod | dedup ServerName | table ServerName | return 500000 $ServerName]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 18:26:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233540#M69354</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-09T18:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233541#M69355</link>
      <description>&lt;P&gt;&lt;CODE&gt;index=software_inventory [ search index=hardware_inventory vendor=hp env=prod ServerName=* | dedup ServerName | fields ServerName | format]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 18:31:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233541#M69355</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-09T18:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233542#M69356</link>
      <description>&lt;P&gt;Thanks so much for your great help!!!&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 13:45:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233542#M69356</guid>
      <dc:creator>raylex_splunk_d</dc:creator>
      <dc:date>2016-05-10T13:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233543#M69357</link>
      <description>&lt;P&gt;Problem solved?  If so can you mark as answer?&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 13:58:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233543#M69357</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-10T13:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233544#M69358</link>
      <description>&lt;P&gt;Yes ! Thank you so much!&lt;BR /&gt;
I did mark the answer!&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 10:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233544#M69358</guid>
      <dc:creator>raylex_splunk_d</dc:creator>
      <dc:date>2016-05-11T10:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list of values from the  first search into the second search ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233545#M69359</link>
      <description>&lt;P&gt;Hii, Which query helped you ??&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 03:34:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-of-values-from-the-first-search-into-the-second/m-p/233545#M69359</guid>
      <dc:creator>Anantha123</dc:creator>
      <dc:date>2018-10-31T03:34:49Z</dc:date>
    </item>
  </channel>
</rss>

