<?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: search with parameters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/503638#M140585</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/57922"&gt;@efika&lt;/a&gt;&lt;BR /&gt;thanks, it is working but it is not allowed me to be dynamic.&lt;BR /&gt;what if my file will contain more than one row ?&lt;BR /&gt;also, not all the values in "row 1" are eventtypes.. how can i use the values from the file as arguments ?&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jun 2020 21:35:20 GMT</pubDate>
    <dc:creator>sarit_s</dc:creator>
    <dc:date>2020-06-09T21:35:20Z</dc:date>
    <item>
      <title>search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470637#M132394</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have this query:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;index=prod eventtype="csm-messages-dhcpd-lpf-eth0-listening" OR eventtype="csm-messages-dhcpd-lpf-eth0-sending" OR eventtype="csm-messages-dhcpd-send-socket-fallback-net" OR eventtype="csm-messages-dhcpd-write-zero-leases" OR eventtype="csm-messages-dhcpd-eth1-nosubnet-declared"
| transaction maxpause=2s maxspan=2s maxevents=5
| eval Max_time=(duration + _time)
| eval Min_time=(_time)
| table _time,eventcount, eventtype ,Min_time, Max_time,tail_id,kafka_uuid
| foreach eventtype
    [eval flag_eventtype=if(eventcount!=5,"no", "yes")]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;now i have a lookup table and i want to set parameters in my query that will be taken from the lookup table.&lt;BR /&gt;for example , instead of searching&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;eventtype="csm-messages-dhcpd-lpf-eth0-listening" OR eventtype="csm-messages-dhcpd-lpf-eth0-sending" OR eventtype="csm-messages-dhcpd-send-socket-fallback-net" OR eventtype="csm-messages-dhcpd-write-zero-leases" OR eventtype="csm-messages-dhcpd-eth1-nosubnet-declared"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;i want to take the values of the eventtype from the lookup table&lt;/P&gt;
&lt;P&gt;how can i do that ?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 17:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470637#M132394</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-06-08T17:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470638#M132395</link>
      <description>&lt;P&gt;Hi Sarit,&lt;/P&gt;

&lt;P&gt;Do a subsearch, get all the lookup values into a Multi Value field (MV) and compare the eventtype in the outer search to this MV.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:23:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470638#M132395</guid>
      <dc:creator>efika</dc:creator>
      <dc:date>2020-06-03T14:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470639#M132396</link>
      <description>&lt;P&gt;@sarit_s &lt;/P&gt;

&lt;P&gt;Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=prod [ |inputlookup myLookup | table eventtype] | YOUR REST SEARCH
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470639#M132396</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-06-03T14:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470640#M132397</link>
      <description>&lt;P&gt;Hey, thanks for your answer.. &lt;BR /&gt;
my lookup table has 10 different columns that calls UsedRule1...UsedRule10&lt;BR /&gt;
eventtype should be each one of the UsedRole in the lookup&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 16:49:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470640#M132397</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-06-03T16:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470641#M132398</link>
      <description>&lt;P&gt;hi, thanks for your answer...&lt;/P&gt;

&lt;P&gt;i know the algorithm, i just don't know how to apply it&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 16:50:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470641#M132398</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-06-03T16:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470642#M132399</link>
      <description>&lt;P&gt;The end result of the subsearch should be a table with a column that is named "eventtype" and values that should be what you are searching for.&lt;BR /&gt;
based on what you are describing you might need to transpose the results of the inputlookup&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 07:21:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470642#M132399</guid>
      <dc:creator>efika</dc:creator>
      <dc:date>2020-06-04T07:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470643#M132400</link>
      <description>&lt;P&gt;im not sure i understood what you are saying... &lt;/P&gt;

&lt;P&gt;this is how my table looks like :&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;AlertNameNonUnique    AlertNameUnique AlertSevirityNonUnique  AlertSevirityUnique UsedRule1   UsedRule10  UsedRule2   UsedRule3   UsedRule4   UsedRule5   UsedRule6   UsedRule7   UsedRule8   UsedRule9&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;how can  i use this values as parameters in my query ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 07:46:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470643#M132400</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-06-04T07:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470644#M132401</link>
      <description>&lt;P&gt;Try this in the subsearch:&lt;BR /&gt;
    | inputlookup &lt;LOOKUP name=""&gt;&lt;BR /&gt;
    | fields Used* &lt;BR /&gt;
    | transpose &lt;BR /&gt;
    | rename "row 1" as eventtype &lt;BR /&gt;
    | fields eventtype&lt;/LOOKUP&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 13:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/470644#M132401</guid>
      <dc:creator>efika</dc:creator>
      <dc:date>2020-06-04T13:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: search with parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/503638#M140585</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/57922"&gt;@efika&lt;/a&gt;&lt;BR /&gt;thanks, it is working but it is not allowed me to be dynamic.&lt;BR /&gt;what if my file will contain more than one row ?&lt;BR /&gt;also, not all the values in "row 1" are eventtypes.. how can i use the values from the file as arguments ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 21:35:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-with-parameters/m-p/503638#M140585</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-06-09T21:35:20Z</dc:date>
    </item>
  </channel>
</rss>

