<?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 Using all info from search in subsearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113242#M183791</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;host=*
| map search="| dbquery Database \"SELECT * FROM Table WHERE Column='$host$'\""
| table *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm fairly new to Splunk (only been playing with it since last Thursday) and I'm still trying to figure things out.  What I'm trying to achieve with script is get all hosts, look them up in the database and then output any data resulting from the match.  It seems to work but only for one host where literally hundreds to thousands should be present.&lt;/P&gt;

&lt;P&gt;What am I doing wrong?&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2015 22:42:59 GMT</pubDate>
    <dc:creator>stevenahl</dc:creator>
    <dc:date>2015-05-18T22:42:59Z</dc:date>
    <item>
      <title>Using all info from search in subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113242#M183791</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;host=*
| map search="| dbquery Database \"SELECT * FROM Table WHERE Column='$host$'\""
| table *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm fairly new to Splunk (only been playing with it since last Thursday) and I'm still trying to figure things out.  What I'm trying to achieve with script is get all hosts, look them up in the database and then output any data resulting from the match.  It seems to work but only for one host where literally hundreds to thousands should be present.&lt;/P&gt;

&lt;P&gt;What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 22:42:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113242#M183791</guid>
      <dc:creator>stevenahl</dc:creator>
      <dc:date>2015-05-18T22:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using all info from search in subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113243#M183792</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=* | dedup host | map search="| dbquery Database \"SELECT * FROM Table WHERE Column='$host$'\""
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 May 2015 14:43:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113243#M183792</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-19T14:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using all info from search in subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113244#M183793</link>
      <description>&lt;P&gt;That did it.  Why would dedup make that work, though?  I don't see the connection...&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 16:24:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113244#M183793</guid>
      <dc:creator>stevenahl</dc:creator>
      <dc:date>2015-05-19T16:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using all info from search in subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113245#M183794</link>
      <description>&lt;P&gt;There is probably a limit to the map command and if you do not &lt;CODE&gt;dedup&lt;/CODE&gt; then you send the same value in over and over and over and over until you hit that limit, before ever getting to any other &lt;CODE&gt;host&lt;/CODE&gt; values.&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 17:42:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-all-info-from-search-in-subsearch/m-p/113245#M183794</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-19T17:42:12Z</dc:date>
    </item>
  </channel>
</rss>

