<?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 Multiple conditions case statements in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Multiple-conditions-case-statements/m-p/539540#M10219</link>
    <description>&lt;P&gt;I'm running a query to label memory thresholds for our app clusters, I would like to create a field called "eff_mem_threshold" based&amp;nbsp; off the number of blades app name.&amp;nbsp; But for the life of me I can't figure out why this case statement isn't working.&amp;nbsp; What I mean is that&amp;nbsp; it only returns the eff_mem_threshold value of the first&amp;nbsp; pair for each app and blade count. I've added an example below the case statement&lt;/P&gt;&lt;P&gt;Case statement&lt;/P&gt;&lt;P&gt;query|eval eff_mem_threshold =case(APP_NAME="EXCH_AD" and Blades&amp;lt;=5, 40,APP_NAME="EXCH_AD" and Blades&amp;gt;=17,46,APP_NAME="EXCH_AD" and Blades&amp;gt;=6 and Blades&amp;lt;=16,44,APP_NAME="VCO" and Blades&amp;lt;=5, 56,APP_NAME="VCO" and Blades&amp;gt;=17,64,APP_NAME="VCO" and Blades&amp;gt;=6 and Blades&amp;lt;=16,61,APP_NAME="SQL" and Blades&amp;lt;=5, 68,APP_NAME="SQL" and Blades&amp;gt;=17,78,APP_NAME="SQL" and Blades&amp;gt;=6 and Blades&amp;lt;=16,74)&lt;BR /&gt;&lt;BR /&gt;what I see&lt;/P&gt;&lt;TABLE width="310px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;APP_NAME&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;Blades&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;eff_mem_threshold&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;EXCH_AD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;15&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;40&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;EXCH_AD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;40&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;17&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;68&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;9&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;68&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;VCO&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;17&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;56&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;VCO&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;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gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;VCO&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;56&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2021 17:34:16 GMT</pubDate>
    <dc:creator>codedtech</dc:creator>
    <dc:date>2021-02-11T17:34:16Z</dc:date>
    <item>
      <title>Multiple conditions case statements</title>
      <link>https://community.splunk.com/t5/Alerting/Multiple-conditions-case-statements/m-p/539540#M10219</link>
      <description>&lt;P&gt;I'm running a query to label memory thresholds for our app clusters, I would like to create a field called "eff_mem_threshold" based&amp;nbsp; off the number of blades app name.&amp;nbsp; But for the life of me I can't figure out why this case statement isn't working.&amp;nbsp; What I mean is that&amp;nbsp; it only returns the eff_mem_threshold value of the first&amp;nbsp; pair for each app and blade count. I've added an example below the case statement&lt;/P&gt;&lt;P&gt;Case statement&lt;/P&gt;&lt;P&gt;query|eval eff_mem_threshold =case(APP_NAME="EXCH_AD" and Blades&amp;lt;=5, 40,APP_NAME="EXCH_AD" and Blades&amp;gt;=17,46,APP_NAME="EXCH_AD" and Blades&amp;gt;=6 and Blades&amp;lt;=16,44,APP_NAME="VCO" and Blades&amp;lt;=5, 56,APP_NAME="VCO" and Blades&amp;gt;=17,64,APP_NAME="VCO" and Blades&amp;gt;=6 and Blades&amp;lt;=16,61,APP_NAME="SQL" and Blades&amp;lt;=5, 68,APP_NAME="SQL" and Blades&amp;gt;=17,78,APP_NAME="SQL" and Blades&amp;gt;=6 and Blades&amp;lt;=16,74)&lt;BR /&gt;&lt;BR /&gt;what I see&lt;/P&gt;&lt;TABLE width="310px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;APP_NAME&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;Blades&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;eff_mem_threshold&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;EXCH_AD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;15&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;40&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;EXCH_AD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;40&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;17&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;68&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;9&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;68&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;VCO&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;17&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;56&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="95px" height="40px"&gt;&lt;P&gt;VCO&lt;/P&gt;&lt;/TD&gt;&lt;TD width="60px" height="40px"&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD width="155px" height="40px"&gt;&lt;P&gt;56&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;What I'd want to see&lt;/P&gt;&lt;TABLE width="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;APP_NAME&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Blades&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;eff_mem_threshold&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;EXCH_AD&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;15&lt;/P&gt;&lt;/TD&gt;&lt;TD width="140"&gt;&lt;P&gt;44&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;EXCH_AD&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD width="140"&gt;&lt;P&gt;40&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;17&lt;/P&gt;&lt;/TD&gt;&lt;TD width="140"&gt;&lt;P&gt;64&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;9&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;61&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;VCO&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;78&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;56&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;VCO&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;56&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 17:34:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Multiple-conditions-case-statements/m-p/539540#M10219</guid>
      <dc:creator>codedtech</dc:creator>
      <dc:date>2021-02-11T17:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions case statements</title>
      <link>https://community.splunk.com/t5/Alerting/Multiple-conditions-case-statements/m-p/539549#M10220</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/190786"&gt;@codedtech&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The only reason seems to be is Blades field value is zero or less than 6. Is it possible that Blades count values are being calculated after this eval? Can you please share all SPL?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 18:19:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Multiple-conditions-case-statements/m-p/539549#M10220</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-02-11T18:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions case statements</title>
      <link>https://community.splunk.com/t5/Alerting/Multiple-conditions-case-statements/m-p/539747#M10221</link>
      <description>&lt;P&gt;That was it, sometimes staring at your own code can make you miss the simple stuff.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 19:08:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Multiple-conditions-case-statements/m-p/539747#M10221</guid>
      <dc:creator>codedtech</dc:creator>
      <dc:date>2021-02-12T19:08:04Z</dc:date>
    </item>
  </channel>
</rss>

