<?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 use value from a drop down that contains reserved characters in a search? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484086#M31714</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval test="[]{}!\"#$%&amp;amp;'()?&amp;gt;&amp;lt; abddeft ?&amp;gt;_test"
| eval test3=replace(test,"[^\w]","_")
| eval test2=$test$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The token looks OK,&lt;BR /&gt;
If necessary, convert it?&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2020 20:19:38 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-02-28T20:19:38Z</dc:date>
    <item>
      <title>How to use value from a drop down that contains reserved characters in a search?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484084#M31712</link>
      <description>&lt;P&gt;I have a table that shows instances of errors from the event log over time by host.  &lt;/P&gt;

&lt;P&gt;I use a drop down that searches the event log data for  Type="Error" | top limit=20 Message  to populate $ErrorMessage$ with the value in the Message column.  Then I have a table that uses $ErrorMessage$ and does this search:  &lt;/P&gt;

&lt;P&gt;Type="Error"  Message ="$ErrorMessage$" |  eval host=upper(host) | timechart count by host&lt;/P&gt;

&lt;P&gt;The table and the drop down both default to 24 hour periods.&lt;/P&gt;

&lt;P&gt;It works, except when the Message contains reserved characters, like [ or ].  Then I don't get any matches, even though results show in the drop down.&lt;/P&gt;

&lt;P&gt;Do I need to escape characters in $ErrorMessage$ when I do my search for the timechart?  If so, how do I do that without knowing what characters will show up or how many?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 14:16:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484084#M31712</guid>
      <dc:creator>robert_adams</dc:creator>
      <dc:date>2020-02-28T14:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to use value from a drop down that contains reserved characters in a search?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484085#M31713</link>
      <description>&lt;P&gt;Drop Down search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| stats count values(host) as host by Message 
| sort 20 - count
| nomv host
| rex field=host mode=sed "s/(\S+)/host=\"\1\" OR /g"
| eval searchquery=trim(host,"OR ")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;throw &lt;CODE&gt;searchquery&lt;/CODE&gt; field.&lt;/P&gt;

&lt;P&gt;Timechart search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Type="Error"  $searchquery$" | eval host=upper(host) | timechart count by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Feb 2020 20:19:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484085#M31713</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-28T20:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use value from a drop down that contains reserved characters in a search?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484086#M31714</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval test="[]{}!\"#$%&amp;amp;'()?&amp;gt;&amp;lt; abddeft ?&amp;gt;_test"
| eval test3=replace(test,"[^\w]","_")
| eval test2=$test$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The token looks OK,&lt;BR /&gt;
If necessary, convert it?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 20:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484086#M31714</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-28T20:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to use value from a drop down that contains reserved characters in a search?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484087#M31715</link>
      <description>&lt;P&gt;Unfortunately it still came back with no data when I quoted the token and errors when I didn't.  I finally got it to work by using the hash for the error message.  Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 21:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-value-from-a-drop-down-that-contains-reserved/m-p/484087#M31715</guid>
      <dc:creator>robert_adams</dc:creator>
      <dc:date>2020-03-05T21:11:31Z</dc:date>
    </item>
  </channel>
</rss>

