<?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: generate dynamic search using lookup in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329127#M8186</link>
    <description>&lt;P&gt;Hi Dal,&lt;/P&gt;

&lt;P&gt;Subsearch will increase overhead .I am looking if the token value of drop down selected should generate/should be like a string  like " (jvm=jvm1 OR jvm=jvm2 OR jvm=jvm2)"&lt;/P&gt;

&lt;P&gt;Like when i selected server1 in drop down the token value of it should be a  string like  " (jvm=jvm1 OR jvm=jvm2 OR jvm=jvm2)"&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2017 21:48:19 GMT</pubDate>
    <dc:creator>splunk403</dc:creator>
    <dc:date>2017-03-02T21:48:19Z</dc:date>
    <item>
      <title>generate dynamic search using lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329123#M8182</link>
      <description>&lt;P&gt;Hi All ,&lt;/P&gt;

&lt;P&gt;I had a lookup table with servername and jvmname :&lt;/P&gt;

&lt;P&gt;ServerName  Jvmname &lt;BR /&gt;
server1       jvm1&lt;BR /&gt;
server1       jvm2 &lt;BR /&gt;
server1        jvm3&lt;/P&gt;

&lt;P&gt;Able to get server1 in drop down through lookup .From the dropdown when i select server1 ,how can i generate search query similar to below &lt;/P&gt;

&lt;P&gt;sourcetype=jvmtype (jvm=jvm1 OR  jvm=jvm2 OR  jvm=jvm2) &lt;/P&gt;

&lt;P&gt;Any quick help is highly appreciated .&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 21:11:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329123#M8182</guid>
      <dc:creator>splunk403</dc:creator>
      <dc:date>2017-03-01T21:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: generate dynamic search using lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329124#M8183</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;your base search 
    [|inputlookup myinput.csv | search ServerName=$TheServerToken$ |
     table Jvmname | rename Jvmname as jvm | format] 
| whatever else you want to do with the search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in the above code $TheServerToken$ would be whatever value you are passing back from the dropdown.&lt;/P&gt;

&lt;P&gt;What this subsearch does is create a table of desired values for jvm, and then the format command changes the output from the subsearch to look like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ((jvm="jvm1") OR (jvm="jvm2") OR (jvm="jvm3"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When the subsearch returns that code into the original base search, the search acts like that code was always there.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 23:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329124#M8183</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-01T23:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: generate dynamic search using lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329125#M8184</link>
      <description>&lt;P&gt;Thanks for the prompt response .This is one way of achieving it .&lt;/P&gt;

&lt;P&gt;Is there a way  we can get through token or field value when we select a server in  drop down(multiselect or single select)    as this is common  logic   in  all panels &lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 00:58:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329125#M8184</guid>
      <dc:creator>splunk403</dc:creator>
      <dc:date>2017-03-02T00:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: generate dynamic search using lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329126#M8185</link>
      <description>&lt;P&gt;That's what i just gave you.  The server value is what you feed into $TheServerToken$ in that subsearch in order to pull the jvm data from the lookup table and feed it to the search.  &lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 02:11:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329126#M8185</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-02T02:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: generate dynamic search using lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329127#M8186</link>
      <description>&lt;P&gt;Hi Dal,&lt;/P&gt;

&lt;P&gt;Subsearch will increase overhead .I am looking if the token value of drop down selected should generate/should be like a string  like " (jvm=jvm1 OR jvm=jvm2 OR jvm=jvm2)"&lt;/P&gt;

&lt;P&gt;Like when i selected server1 in drop down the token value of it should be a  string like  " (jvm=jvm1 OR jvm=jvm2 OR jvm=jvm2)"&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 21:48:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/generate-dynamic-search-using-lookup/m-p/329127#M8186</guid>
      <dc:creator>splunk403</dc:creator>
      <dc:date>2017-03-02T21:48:19Z</dc:date>
    </item>
  </channel>
</rss>

