<?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 to filter events using text box values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704715#M238737</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;If i want to search multiple keywords using comma seperate in the same text field.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2024 11:58:50 GMT</pubDate>
    <dc:creator>karthi2809</dc:creator>
    <dc:date>2024-11-19T11:58:50Z</dc:date>
    <item>
      <title>How to filter events using text box values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704698#M238731</link>
      <description>&lt;P&gt;How to filter events in the dashboard with help of search box.In the search box i have to give multiple strings like error,warning so i need to sort out only error and warning logs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;In Dashboard XML:

&amp;lt;input type="text" token="Text_Token" searchWhenChanged="true"&amp;gt;
&amp;lt;label&amp;gt;Error Search (comm-seprated)&amp;lt;/label&amp;gt;

&amp;lt;/input&amp;gt;

index=test Message="*"| eval error_list=split("$Text_Token$", ",")| table PST_Time Environment Host Component FileName Message | search Message IN ("error_list") OR Environment=QDEV Component IN (AdminServer) FileName=*| search NOT Message IN ("*null*")|sort PST_Time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 08:29:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704698#M238731</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-11-19T08:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events using text box values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704699#M238732</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/205249"&gt;@karthi2809&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;at first, if you have the fields in the main search, don't use the search command in the secondary lines but always in the main,&lt;/P&gt;&lt;P&gt;then, the easiest way it to use the OR boolean operator to divide words to search, instead commas:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test Message="* ($Text_Token$) 
| sort PST_Time&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 08:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704699#M238732</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-11-19T08:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events using text box values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704702#M238733</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="karthi2809_0-1732006603864.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33509iB62C222EE36EE795/image-size/medium?v=v2&amp;amp;px=400" role="button" title="karthi2809_0-1732006603864.png" alt="karthi2809_0-1732006603864.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am using multiple filter in that Error search is one of the filter in which i need to type the values or multiple values with comma and i need to filter the result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 08:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704702#M238733</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-11-19T08:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events using text box values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704715#M238737</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;If i want to search multiple keywords using comma seperate in the same text field.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 11:58:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704715#M238737</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-11-19T11:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events using text box values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704782#M238746</link>
      <description>&lt;P&gt;Let me first comment that your use case should NOT be a freetext "search box" as input. &amp;nbsp;It should be a multiselect. &amp;nbsp;Play with the following example and see if it fits your needs:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form version="1.1" theme="light"&amp;gt;
  &amp;lt;label&amp;gt;Multivalue input&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704698&amp;lt;/description&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="multivalue_field_tok" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;select all field values&amp;lt;/label&amp;gt;
      &amp;lt;choice value="INFO"&amp;gt;INFO&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="WARNING"&amp;gt;WARNING&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="ERROR"&amp;gt;ERROR&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="multiselect" token="multivalue_term_tok" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;select all terms&amp;lt;/label&amp;gt;
      &amp;lt;choice value="INFO"&amp;gt;INFO&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="WARNING"&amp;gt;WARNING&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="ERROR"&amp;gt;ERROR&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index = _internal log_level IN ($multivalue_field_tok$)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="list.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/event&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;title&amp;gt;no field name&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index = _internal ($multivalue_term_tok$)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="list.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/event&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;If comma-delimited freetext term input is needed, it is doable, but will not be as efficient as the above. &amp;nbsp;Please state your use case clearly (without help of SPL) so volunteers can give you concrete help.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 22:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704782#M238746</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-11-19T22:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events using text box values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/705552#M238868</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case i need to search in textbox with dynamic values from message field not with predefined values.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2024 11:34:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/705552#M238868</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-11-29T11:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events using text box values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/705622#M238876</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;In my case i need to search in textbox with dynamic values from message field not with predefined values.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Dynamic doesn't mean it should be free text. &amp;nbsp;This next example gives you two inputs, one a truly dynamic, multiselect, the other a free text if you absolutely want to go that route.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form version="1.1"&amp;gt;
  &amp;lt;label&amp;gt;Multivalue input&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/704698&amp;lt;/description&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="multiselect" token="multiselect_tok" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;select all applicable&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;log_level&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;log_level&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index = _internal log_level = *
| stats count by log_level&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="text" token="multivalue_text_tok" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;enter comma separated&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;title&amp;gt;Using &amp;amp;gt;$multiselect_tok$&amp;amp;lt;&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index = _internal log_level IN ($multiselect_tok$)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="list.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/event&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;title&amp;gt;Using &amp;amp;gt;$multivalue_text_tok$&amp;amp;lt;&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index = _internal
    [| makeresults
    | fields - _time
    | eval log_level = upper(trim(split("$multivalue_text_tok$", ",")))]&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="list.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/event&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem with free text is that people make far more mistakes than machines do. &amp;nbsp;My code tries to cope with that as much as possible. &amp;nbsp;But unless you have a use case that uses free text in a meaningful way, forget comma delimited input.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 01:17:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/705622#M238876</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-12-01T01:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events using text box values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/705641#M238881</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/205249"&gt;@karthi2809&lt;/a&gt;&amp;nbsp;I tend to use a text box where I can insert a where clause, like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;row id="button_row"&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;input id="events_where" type="text" token="where_clause" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;Event filter where clause&amp;lt;/label&amp;gt;
        &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;
index=_internal host=bla
| where $where_clause$
          &amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$selection.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$selection.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/event&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;it gives you flexibility to construct whatever you want, so as long as you know how to write valid SPL queries, you can use whatever&amp;nbsp;&lt;STRONG&gt;eval&lt;/STRONG&gt; statements you like, e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1733091180789.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33638i0D1149EC2B4CC180/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1733091180789.png" alt="bowesmana_0-1733091180789.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;You can do it with a search clause, but I find more flexibility to use eval based filters.&lt;/P&gt;&lt;P&gt;You can also make your text box nice and wide using the id="xxx" in the &amp;lt;input&amp;gt; and then add this css&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;row depends="$CSS$"&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
          #events_where .splunk-textinput { width: 400px !important; }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 01 Dec 2024 22:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-text-box-values/m-p/705641#M238881</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-12-01T22:15:47Z</dc:date>
    </item>
  </channel>
</rss>

