<?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 How to keyword search values in a lookup table without using field names in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-keyword-search-values-in-a-lookup-table-without-using/m-p/468415#M131895</link>
    <description>&lt;P&gt;Assume you have a lookup table and you want to load the lookup table and then search the lookup table for a value or values but you don't know which field/column the value(s) might be in in the lookup table.  &lt;/P&gt;

&lt;P&gt;How can you search the lookup table for the value(s) without defining every possible field=value combination in the search?&lt;/P&gt;

&lt;P&gt;For example the following fails:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup uid_host_ip_mac.csv 
| search myuserid OR myhostname OR myip OR mymac
| table _time uid host ip mac
| sort - _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the below would work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup uid_host_ip_mac.csv 
| search uid=myuserid OR uid=myhostname OR uid=myip OR uid=mymac OR host=myuserid OR host=myhostname OR host=myip OR host=mymac OR ip=myuserid OR ip=myhostname OR ip=myip OR ip=mymac OR mac=myuserid OR mac=myhostname OR mac=myip OR mac=mymac
| table _time uid host ip mac
| sort - _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Obviously in this case I know which field=value pairs go together so I wouldn't in reality use all these possible combinations in this example, but if I didn't know which field=value pairs went together, how could I keyword search the lookup table like in the first example?&lt;/P&gt;</description>
    <pubDate>Thu, 06 Feb 2020 19:17:45 GMT</pubDate>
    <dc:creator>marycordova</dc:creator>
    <dc:date>2020-02-06T19:17:45Z</dc:date>
    <item>
      <title>How to keyword search values in a lookup table without using field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-keyword-search-values-in-a-lookup-table-without-using/m-p/468415#M131895</link>
      <description>&lt;P&gt;Assume you have a lookup table and you want to load the lookup table and then search the lookup table for a value or values but you don't know which field/column the value(s) might be in in the lookup table.  &lt;/P&gt;

&lt;P&gt;How can you search the lookup table for the value(s) without defining every possible field=value combination in the search?&lt;/P&gt;

&lt;P&gt;For example the following fails:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup uid_host_ip_mac.csv 
| search myuserid OR myhostname OR myip OR mymac
| table _time uid host ip mac
| sort - _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the below would work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup uid_host_ip_mac.csv 
| search uid=myuserid OR uid=myhostname OR uid=myip OR uid=mymac OR host=myuserid OR host=myhostname OR host=myip OR host=mymac OR ip=myuserid OR ip=myhostname OR ip=myip OR ip=mymac OR mac=myuserid OR mac=myhostname OR mac=myip OR mac=mymac
| table _time uid host ip mac
| sort - _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Obviously in this case I know which field=value pairs go together so I wouldn't in reality use all these possible combinations in this example, but if I didn't know which field=value pairs went together, how could I keyword search the lookup table like in the first example?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 19:17:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-keyword-search-values-in-a-lookup-table-without-using/m-p/468415#M131895</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2020-02-06T19:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to keyword search values in a lookup table without using field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-keyword-search-values-in-a-lookup-table-without-using/m-p/468416#M131896</link>
      <description>&lt;P&gt;To search a lookup table with keyword values not tied to fields/columns (field=keyword) just add an artificial  &lt;CODE&gt;_raw&lt;/CODE&gt; event field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup uid_host_ip_mac_rolling.csv 
| eval _raw=tostring(mvjoin((mvappend('uid','host','ip,'mac'))," : "))
| search myuserid OR my-hostname OR myip OR mymac
| table _time uid host ip mac
| sort - _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can use any delimiter you want, it doesn't have to be a " : "&lt;BR /&gt;
also the tostring might not be necessary...&lt;BR /&gt;
&lt;CODE&gt;| eval _raw=tostring(mvjoin((mvappend('uid','host','ip,'mac'))," : "))&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 19:21:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-keyword-search-values-in-a-lookup-table-without-using/m-p/468416#M131896</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2020-02-06T19:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to keyword search values in a lookup table without using field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-keyword-search-values-in-a-lookup-table-without-using/m-p/468417#M131897</link>
      <description>&lt;P&gt;this also sounds awesome and is sorta related &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/685436/how-to-use-subsearch-without-a-field-name-but-just.html"&gt;https://answers.splunk.com/answers/685436/how-to-use-subsearch-without-a-field-name-but-just.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 19:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-keyword-search-values-in-a-lookup-table-without-using/m-p/468417#M131897</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2020-02-06T19:43:06Z</dc:date>
    </item>
  </channel>
</rss>

