<?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: Create and Reuse Variable in Multiple Places in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383941#M112142</link>
    <description>&lt;P&gt;Thanks @nabeel652 &lt;BR /&gt;
This not suffice the need because when creating a var inside a dashboard it will only live within that context and it won't be visible when configuring my alert.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2019 15:53:23 GMT</pubDate>
    <dc:creator>jslealdi</dc:creator>
    <dc:date>2019-07-11T15:53:23Z</dc:date>
    <item>
      <title>Create and Reuse Variable in Multiple Places</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383939#M112140</link>
      <description>&lt;P&gt;Hi guys.&lt;/P&gt;

&lt;P&gt;I want to create a variable, lets say &lt;CODE&gt;my_var_thresdold = 1000&lt;/CODE&gt;&lt;BR /&gt;
After that, I want to use that var in two places:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Within an alert: place my_var_thresdold as a trigger condition; like: is_greater than &lt;CODE&gt;$my_var_thresdold$&lt;/CODE&gt; &lt;IMG src="http://prntscr.com/od7m96" alt="External var in an alert" /&gt;&lt;/LI&gt;
&lt;LI&gt;Within a dashboard,  when writing a query, use that very same var; like &lt;CODE&gt;| eval maxAlert=$my_var_thresdold$&lt;/CODE&gt; &lt;IMG src="http://prntscr.com/od7pxg" alt="External var within a dashboard" /&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I was taking a look at SideView utils, but I was not able to find anything that works for my situation. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:16:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383939#M112140</guid>
      <dc:creator>jslealdi</dc:creator>
      <dc:date>2020-09-30T01:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create and Reuse Variable in Multiple Places</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383940#M112141</link>
      <description>&lt;P&gt;Under&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;init&amp;gt;
     &amp;lt;set token="my_var_threshold"&amp;gt;1000&amp;lt;/set&amp;gt;
  &amp;lt;/init&amp;gt;
.... Your other xml code

&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Define the token and then use it anywhere in your searches just like a variable. &lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 23:31:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383940#M112141</guid>
      <dc:creator>nabeel652</dc:creator>
      <dc:date>2019-07-10T23:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create and Reuse Variable in Multiple Places</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383941#M112142</link>
      <description>&lt;P&gt;Thanks @nabeel652 &lt;BR /&gt;
This not suffice the need because when creating a var inside a dashboard it will only live within that context and it won't be visible when configuring my alert.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 15:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383941#M112142</guid>
      <dc:creator>jslealdi</dc:creator>
      <dc:date>2019-07-11T15:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create and Reuse Variable in Multiple Places</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383942#M112143</link>
      <description>&lt;P&gt;Hi. I ended up using a lookup table, storing my thresholds there and using them from both the dashboard query and from the alert query.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 20:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-and-Reuse-Variable-in-Multiple-Places/m-p/383942#M112143</guid>
      <dc:creator>jslealdi</dc:creator>
      <dc:date>2019-07-22T20:00:36Z</dc:date>
    </item>
  </channel>
</rss>

