<?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: Using parameters in rangemap in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-parameters-in-rangemap/m-p/62314#M15398</link>
    <description>&lt;P&gt;Rangemap only takes explicit integers. However, rangemap basically only is shorthand for case:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval range = case(field &amp;lt; low_threshold, "low", field &amp;lt; elevated_threshold, "elevated", field &amp;gt;= elevated_threshold, "severe")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note, this is not exactly the same as the first rangemap you quote - negative values get the default from rangemap but low from this case. Just take care to specify the case conditions accurately to match your requirements.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Dec 2012 14:11:00 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2012-12-13T14:11:00Z</dc:date>
    <item>
      <title>Using parameters in rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-parameters-in-rangemap/m-p/62313#M15397</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;what I want to achieve is a dynamic (datetime based) rangemap of an application's exceptions. So, instead of terminating my search with a simple&lt;/P&gt;

&lt;P&gt;... | rangemap low=0-100 elevated=101-200 default=severe&lt;/P&gt;

&lt;P&gt;I would rather something like that:&lt;/P&gt;

&lt;P&gt;... | rangemap low=0-thr elevated=thr-2*thr default=severe&lt;/P&gt;

&lt;P&gt;where thr is a value extracted from a lookup table. Is this possible?&lt;BR /&gt;
Regards,&lt;/P&gt;

&lt;P&gt;Stefano&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 12:09:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-parameters-in-rangemap/m-p/62313#M15397</guid>
      <dc:creator>stefano_guidoba</dc:creator>
      <dc:date>2012-12-13T12:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using parameters in rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-parameters-in-rangemap/m-p/62314#M15398</link>
      <description>&lt;P&gt;Rangemap only takes explicit integers. However, rangemap basically only is shorthand for case:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval range = case(field &amp;lt; low_threshold, "low", field &amp;lt; elevated_threshold, "elevated", field &amp;gt;= elevated_threshold, "severe")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note, this is not exactly the same as the first rangemap you quote - negative values get the default from rangemap but low from this case. Just take care to specify the case conditions accurately to match your requirements.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 14:11:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-parameters-in-rangemap/m-p/62314#M15398</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2012-12-13T14:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using parameters in rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-parameters-in-rangemap/m-p/62315#M15399</link>
      <description>&lt;P&gt;Hi Martin,&lt;/P&gt;

&lt;P&gt;in the end I did exactly what you suggested encasing the eval command in a macro. Thanks for your suggestion,&lt;BR /&gt;
regards&lt;/P&gt;

&lt;P&gt;Stefano&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 14:20:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-parameters-in-rangemap/m-p/62315#M15399</guid>
      <dc:creator>stefano_guidoba</dc:creator>
      <dc:date>2012-12-13T14:20:35Z</dc:date>
    </item>
  </channel>
</rss>

