<?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 can I iterate through an inputlookup? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411275#M118653</link>
    <description>&lt;P&gt;Great @jkat54, and if the host is named differently in the &lt;CODE&gt;inputlookup&lt;/CODE&gt;?&lt;/P&gt;</description>
    <pubDate>Fri, 25 May 2018 16:46:04 GMT</pubDate>
    <dc:creator>ddrillic</dc:creator>
    <dc:date>2018-05-25T16:46:04Z</dc:date>
    <item>
      <title>How can I iterate through an inputlookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411273#M118651</link>
      <description>&lt;P&gt;I have the following query - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal         

host =  &amp;lt;host1&amp;gt; OR
host =  &amp;lt;host2&amp;gt; OR
host =  &amp;lt;host3&amp;gt;


| table _time host | dedup host             
| sort host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to run this commmand via a &lt;CODE&gt;inputlookup&lt;/CODE&gt;. So, I created this lookup and &lt;CODE&gt;| inputlookup hosts_05_25_18&lt;/CODE&gt; shows the host names.&lt;/P&gt;

&lt;P&gt;How can I run the above query using this &lt;CODE&gt;inputlookup&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;Similar to the case at &lt;A href="https://answers.splunk.com/answers/443165/inputlookup-how-to-search-through-all-lookup-field.html"&gt;inputlookup - How to search through all lookup fields&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 15:44:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411273#M118651</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-05-25T15:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I iterate through an inputlookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411274#M118652</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;  index=yourIndex  [ | inputlookup lookupname | format ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 May 2018 16:17:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411274#M118652</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-05-25T16:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I iterate through an inputlookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411275#M118653</link>
      <description>&lt;P&gt;Great @jkat54, and if the host is named differently in the &lt;CODE&gt;inputlookup&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 16:46:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411275#M118653</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-05-25T16:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I iterate through an inputlookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411276#M118654</link>
      <description>&lt;P&gt;Sure,  try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup lookupname | eval host=‘*’.fieldFromLookup.’*’ | format
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This would add wildcards around the field value before returning to the root search&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 18:44:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411276#M118654</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-05-25T18:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I iterate through an inputlookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411277#M118655</link>
      <description>&lt;P&gt;For the record, &lt;CODE&gt;eval host=host + "*"&lt;/CODE&gt; worked to include hosts with domain names...&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jan 2019 22:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411277#M118655</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-01-27T22:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I iterate through an inputlookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411278#M118656</link>
      <description>&lt;P&gt;It's good to have here a reference to this masterpiece answer by @acharlieh - &lt;A href="https://answers.splunk.com/answers/390349/what-is-the-basic-difference-between-the-lookup-in.html"&gt;What is the basic difference between the lookup, inputlook and outputlookup commands&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 01:13:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-iterate-through-an-inputlookup/m-p/411278#M118656</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-02-11T01:13:28Z</dc:date>
    </item>
  </channel>
</rss>

