<?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 inputlookup value as source in search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-inputlookup-value-as-source-in-search/m-p/484150#M135518</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm new to Splunk so sorry if this seems like a basic question.&lt;/P&gt;

&lt;P&gt;Previously, in my search I was listing various sources in the query itself:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=my_index  host=my_host  source="comp_1.log" OR source="comp_2.log" OR ...) "keyword I'm looking for in event"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, that was getting difficult to maintain and doesn't really fit my requirements so I have now moved my sources to a lookup file with a structure like this:&lt;/P&gt;

&lt;P&gt;sources.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source,
"comp_1.log"
"comp_2.log"
...
"comp_n.log"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My question is can I use these values in a search in a similar way to how I would use tokens?&lt;/P&gt;

&lt;P&gt;I tried something like this but am not getting any results&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup sources.csv | search  index=my_index  host=my_host  source=source "keyword I'm looking for in event"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm sure this is something that can be done and that I'm just making a mistake somewhere.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2020 14:54:46 GMT</pubDate>
    <dc:creator>eoghanmcd</dc:creator>
    <dc:date>2020-02-28T14:54:46Z</dc:date>
    <item>
      <title>Using inputlookup value as source in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-inputlookup-value-as-source-in-search/m-p/484150#M135518</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm new to Splunk so sorry if this seems like a basic question.&lt;/P&gt;

&lt;P&gt;Previously, in my search I was listing various sources in the query itself:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=my_index  host=my_host  source="comp_1.log" OR source="comp_2.log" OR ...) "keyword I'm looking for in event"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, that was getting difficult to maintain and doesn't really fit my requirements so I have now moved my sources to a lookup file with a structure like this:&lt;/P&gt;

&lt;P&gt;sources.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source,
"comp_1.log"
"comp_2.log"
...
"comp_n.log"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My question is can I use these values in a search in a similar way to how I would use tokens?&lt;/P&gt;

&lt;P&gt;I tried something like this but am not getting any results&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup sources.csv | search  index=my_index  host=my_host  source=source "keyword I'm looking for in event"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm sure this is something that can be done and that I'm just making a mistake somewhere.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 14:54:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-inputlookup-value-as-source-in-search/m-p/484150#M135518</guid>
      <dc:creator>eoghanmcd</dc:creator>
      <dc:date>2020-02-28T14:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using inputlookup value as source in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-inputlookup-value-as-source-in-search/m-p/484151#M135519</link>
      <description>&lt;P&gt;Try a subsearch.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index  host=my_host  [ | inputlookup sources.csv | format ] "keyword I'm looking for in event"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Feb 2020 15:33:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-inputlookup-value-as-source-in-search/m-p/484151#M135519</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-02-28T15:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using inputlookup value as source in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-inputlookup-value-as-source-in-search/m-p/484152#M135520</link>
      <description>&lt;P&gt;I hadn't come across &lt;CODE&gt;format&lt;/CODE&gt; to concatenate values before but it suits my needs perfectly, here thanks&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 15:43:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-inputlookup-value-as-source-in-search/m-p/484152#M135520</guid>
      <dc:creator>eoghanmcd</dc:creator>
      <dc:date>2020-02-28T15:43:13Z</dc:date>
    </item>
  </channel>
</rss>

