<?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 a token to define a lookup name. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415412#M119595</link>
    <description>&lt;P&gt;I have defined a token "$command$, this happens to be a command name. The command is currently the curl command. I wish to use this token in a dashboard to use the command name as the lookup name. As I wish to return fields, values about a command uniquely. &lt;BR /&gt;
As an example &lt;/P&gt;

&lt;P&gt;lookup $command$ option as switch&lt;/P&gt;

&lt;P&gt;This does not work, I get error &lt;/P&gt;

&lt;P&gt;Error in 'lookup' command: Lookups: Could not construct lookup 'cat, option, as, switch'. See search.log for more details.&lt;/P&gt;

&lt;P&gt;I suspect this is not possible but wondered if the community if it is possible? Or if anyone can suggest a away to dynamically populate the lookup name based on field values. &lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2019 11:38:09 GMT</pubDate>
    <dc:creator>pbryant_splunk</dc:creator>
    <dc:date>2019-06-07T11:38:09Z</dc:date>
    <item>
      <title>Using a token to define a lookup name.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415412#M119595</link>
      <description>&lt;P&gt;I have defined a token "$command$, this happens to be a command name. The command is currently the curl command. I wish to use this token in a dashboard to use the command name as the lookup name. As I wish to return fields, values about a command uniquely. &lt;BR /&gt;
As an example &lt;/P&gt;

&lt;P&gt;lookup $command$ option as switch&lt;/P&gt;

&lt;P&gt;This does not work, I get error &lt;/P&gt;

&lt;P&gt;Error in 'lookup' command: Lookups: Could not construct lookup 'cat, option, as, switch'. See search.log for more details.&lt;/P&gt;

&lt;P&gt;I suspect this is not possible but wondered if the community if it is possible? Or if anyone can suggest a away to dynamically populate the lookup name based on field values. &lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 11:38:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415412#M119595</guid>
      <dc:creator>pbryant_splunk</dc:creator>
      <dc:date>2019-06-07T11:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using a token to define a lookup name.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415413#M119596</link>
      <description>&lt;P&gt;While tokens can be used to replace text in many places, the replacement must be valid SPL.  The &lt;CODE&gt;lookup&lt;/CODE&gt; command takes the name of the lookup table as its first argument.  In this example, for the token to work it must contain an existing lookup table name.  If $command$ contains "curl &lt;A href="https://splunk.com"&gt;https://splunk.com&lt;/A&gt;", for example, the resulting command becomes &lt;CODE&gt;lookup curl &lt;A href="https://splunk.com" target="test_blank"&gt;https://splunk.com&lt;/A&gt; option as switch&lt;/CODE&gt;, which will fail not only because 'curl' is unlikely to be a lookup name, but "&lt;A href="https://splunk.com"&gt;https://splunk.com&lt;/A&gt;" cannot be the name of a field in a lookup.&lt;/P&gt;

&lt;P&gt;It is not possible to use arbitrary commands with &lt;CODE&gt;lookup&lt;/CODE&gt; to get data from other sources.  &lt;/P&gt;</description>
      <pubDate>Sat, 08 Jun 2019 22:47:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415413#M119596</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-06-08T22:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using a token to define a lookup name.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415414#M119597</link>
      <description>&lt;P&gt;So just to confirm. The command curl is just a string i.e. the word curl. It could be any word really derived from a field. It would be single word, no spaces. &lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 10:26:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415414#M119597</guid>
      <dc:creator>pbryant_splunk</dc:creator>
      <dc:date>2019-06-10T10:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using a token to define a lookup name.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415415#M119598</link>
      <description>&lt;P&gt;The string still must represent an existing lookup definition.  The remaining arguments to the lookup command must be valid field names in the referenced lookup.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 11:21:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415415#M119598</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-06-10T11:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using a token to define a lookup name.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415416#M119599</link>
      <description>&lt;P&gt;There are a couple different curl SPL commands out there.  Check splunkbase for "curl".&lt;/P&gt;

&lt;P&gt;But it looks like you're trying to add Linux shell commands to the lookup and that's not going to work&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 11:37:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-token-to-define-a-lookup-name/m-p/415416#M119599</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-06-10T11:37:36Z</dc:date>
    </item>
  </channel>
</rss>

