<?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 compared to a threshold whose value varies depending on the value of another field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/compared-to-a-threshold-whose-value-varies-depending-on-the/m-p/33089#M7008</link>
    <description>&lt;P&gt;I am processing packets drop log events and want to have a report that contains only those events with nopktDrop&amp;gt;= threshold. I have the following from raw log data, with each row extracted from an event log message&lt;/P&gt;

&lt;P&gt;time policy noPktDrop&lt;BR /&gt;
time1   1   45&lt;BR /&gt;
time2   2   50&lt;BR /&gt;
time3   3   30&lt;BR /&gt;
time4   2   36&lt;/P&gt;

&lt;P&gt;The threshold for each policy is different, for example, threshold = 40, 30, and 40 for policy 1, 2, and 3, respectively in the above example. What I want to have is the following report:&lt;/P&gt;

&lt;P&gt;time policy noPktDrop&lt;BR /&gt;
time1   1   45&lt;BR /&gt;
time2   2   50&lt;BR /&gt;
time4   2   36&lt;/P&gt;

&lt;P&gt;Any suggestion on how to generate such a report?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Feb 2013 19:55:41 GMT</pubDate>
    <dc:creator>myli12</dc:creator>
    <dc:date>2013-02-14T19:55:41Z</dc:date>
    <item>
      <title>compared to a threshold whose value varies depending on the value of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compared-to-a-threshold-whose-value-varies-depending-on-the/m-p/33089#M7008</link>
      <description>&lt;P&gt;I am processing packets drop log events and want to have a report that contains only those events with nopktDrop&amp;gt;= threshold. I have the following from raw log data, with each row extracted from an event log message&lt;/P&gt;

&lt;P&gt;time policy noPktDrop&lt;BR /&gt;
time1   1   45&lt;BR /&gt;
time2   2   50&lt;BR /&gt;
time3   3   30&lt;BR /&gt;
time4   2   36&lt;/P&gt;

&lt;P&gt;The threshold for each policy is different, for example, threshold = 40, 30, and 40 for policy 1, 2, and 3, respectively in the above example. What I want to have is the following report:&lt;/P&gt;

&lt;P&gt;time policy noPktDrop&lt;BR /&gt;
time1   1   45&lt;BR /&gt;
time2   2   50&lt;BR /&gt;
time4   2   36&lt;/P&gt;

&lt;P&gt;Any suggestion on how to generate such a report?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2013 19:55:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compared-to-a-threshold-whose-value-varies-depending-on-the/m-p/33089#M7008</guid>
      <dc:creator>myli12</dc:creator>
      <dc:date>2013-02-14T19:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: compared to a threshold whose value varies depending on the value of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compared-to-a-threshold-whose-value-varies-depending-on-the/m-p/33090#M7009</link>
      <description>&lt;P&gt;There are a number of options.  If there are a large number of policy ids, or you will reuse the policy/threshold mappings in numerous searches, you might consider using a lookup to maintain the policy/threshold mappings.  Otherwise, here is a simple way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval t = case(policy == 1, 45, policy == 2, 40, policy == 3, 40) | where noPktDrop &amp;gt;= t
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Feb 2013 00:10:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compared-to-a-threshold-whose-value-varies-depending-on-the/m-p/33090#M7009</guid>
      <dc:creator>Ron_Naken</dc:creator>
      <dc:date>2013-02-15T00:10:30Z</dc:date>
    </item>
  </channel>
</rss>

