<?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: Use db results in splunk search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133741#M184674</link>
    <description>&lt;P&gt;Without that $ it'll generate a filter like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( ( ID=value1 ) OR ( ID=value2 ) OR ... )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...which fails because you're looking for strings appearing somewhere in your events rather than values of a field called ID.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Apr 2014 18:22:37 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-04-16T18:22:37Z</dc:date>
    <item>
      <title>Use db results in splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133738#M184671</link>
      <description>&lt;P&gt;Hello, I want to use the results of my dbquery as search strings in the log files.&lt;/P&gt;

&lt;P&gt;Currently I am running two different Splunk searches then copy find/replace and pasting the result from 1 to 2. &lt;BR /&gt;
1:&lt;BR /&gt;
|dbquery JiraDB "SELECT TOP 1000 [ID] FROM [jiraDB].[JIRA].[searchrequest] where [USERNAME] = 'dfredell'"&lt;/P&gt;

&lt;P&gt;2: &lt;BR /&gt;
sourcetype=access_log "14196" OR "17516" OR "17525" OR .....&lt;/P&gt;

&lt;P&gt;The output from 1 has 300 items and looks like:&lt;BR /&gt;&lt;BR /&gt;
ID&lt;BR /&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;14196&lt;BR /&gt;&lt;BR /&gt;
17516&lt;BR /&gt;&lt;BR /&gt;
17525&lt;BR /&gt;&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;The data in access_log is a standard Apache Web Log and I am searching for the url to contain any of the ID values.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 15:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133738#M184671</guid>
      <dc:creator>dfredell</dc:creator>
      <dc:date>2014-04-16T15:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use db results in splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133739#M184672</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_log [dbquery JiraDB "SELECT TOP 1000 [ID] FROM [jiraDB].[JIRA].[searchrequest] where [USERNAME] = 'dfredell'" | return 1000 $ID]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will turn the results from the &lt;CODE&gt;dbquery&lt;/CODE&gt; into an OR'd list of your ID values and use it to filter the access_log search.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 17:00:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133739#M184672</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-16T17:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Use db results in splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133740#M184673</link>
      <description>&lt;P&gt;Wow that was perfect thank you! I had tried that before, I guess all I was missing was the '$' on ID.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 18:10:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133740#M184673</guid>
      <dc:creator>dfredell</dc:creator>
      <dc:date>2014-04-16T18:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use db results in splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133741#M184674</link>
      <description>&lt;P&gt;Without that $ it'll generate a filter like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( ( ID=value1 ) OR ( ID=value2 ) OR ... )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...which fails because you're looking for strings appearing somewhere in your events rather than values of a field called ID.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 18:22:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-db-results-in-splunk-search/m-p/133741#M184674</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-16T18:22:37Z</dc:date>
    </item>
  </channel>
</rss>

