<?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 save bracket syntax in a report in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448027#M126973</link>
    <description>&lt;P&gt;hummm&lt;BR /&gt;
do I have to do something like this??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| inputlookup host.csv 
    | table host] `CPU` tok_filtersite="$tok_filtersite|s$"
| where process_cpu_used_percent&amp;gt;80 
| bucket _time span=3m 
| lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
| search SITE=$tok_filtersite|s$ 
| stats dc(host)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 25 Jun 2019 09:05:51 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2019-06-25T09:05:51Z</dc:date>
    <item>
      <title>How to save bracket syntax in a report</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448024#M126970</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
In my XML file, I use the syntax below which works perfectly&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   | search SITE=$tok_filtersite|s$ 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I need to save it in a report but it doesn't work.&lt;BR /&gt;
I tried with ""&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      | search SITE="$tok_filtersite|s$ "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With this, I can save the report but the filter token doesn't work.&lt;BR /&gt;
What should I do, please?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 05:14:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448024#M126970</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-25T05:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to save bracket syntax in a report</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448025#M126971</link>
      <description>&lt;P&gt;Hi @jip31,&lt;/P&gt;

&lt;P&gt;In your &lt;CODE&gt;savedsearch&lt;/CODE&gt; keep the token as &lt;CODE&gt;$tok_filtersite$&lt;/CODE&gt; and when you call your saved search call it as follows :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
 &amp;lt;query&amp;gt;| savedsearch "Your SavedSearch" tok_filtersite="$tok_filtersite|s$"&amp;lt;/query&amp;gt;
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You will send the escaped value directly to your saved search, no need to escape it twice.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 08:33:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448025#M126971</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-06-25T08:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to save bracket syntax in a report</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448026#M126972</link>
      <description>&lt;P&gt;hi many thanks&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 08:49:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448026#M126972</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-25T08:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to save bracket syntax in a report</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448027#M126973</link>
      <description>&lt;P&gt;hummm&lt;BR /&gt;
do I have to do something like this??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| inputlookup host.csv 
    | table host] `CPU` tok_filtersite="$tok_filtersite|s$"
| where process_cpu_used_percent&amp;gt;80 
| bucket _time span=3m 
| lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
| search SITE=$tok_filtersite|s$ 
| stats dc(host)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jun 2019 09:05:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448027#M126973</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-25T09:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to save bracket syntax in a report</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448028#M126974</link>
      <description>&lt;P&gt;Is this your saved search ? If so it should be like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [| inputlookup host.csv 
     | table host] `CPU` tok_filtersite="$tok_filtersite$"
 | where process_cpu_used_percent&amp;gt;80 
 | bucket _time span=3m 
 | lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
 | search SITE=$tok_filtersite$ 
 | stats dc(host)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then when you call it from a dashboard, you call it like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...
  | savedsearch "Your SavedSearch" tok_filtersite="$tok_filtersite|s$"
 ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jun 2019 09:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448028#M126974</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-06-25T09:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to save bracket syntax in a report</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448029#M126975</link>
      <description>&lt;P&gt;OK thanks...&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 09:45:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-save-bracket-syntax-in-a-report/m-p/448029#M126975</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-25T09:45:16Z</dc:date>
    </item>
  </channel>
</rss>

