<?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: SPL in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532653#M150473</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; For below requirement i am use the case statement with ! Condition. Please assist.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_20201210_200002.jpg" style="width: 4000px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12243i532EE6F0B32F2091/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMG_20201210_200002.jpg" alt="IMG_20201210_200002.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Dec 2020 14:31:46 GMT</pubDate>
    <dc:creator>uagraw01</dc:creator>
    <dc:date>2020-12-10T14:31:46Z</dc:date>
    <item>
      <title>SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532639#M150467</link>
      <description>&lt;P&gt;How can i use multiple NOT condition in my second eval function. My attribute is there state_desc!="ONLINE" OR&amp;nbsp;state_desc!="OFFLINE"&lt;/P&gt;&lt;P&gt;In above condition i always returned only first value not for the second one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is need to use LIKE , match or any other command because result is in string .please suggest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_20201210_190356.jpg" style="width: 4000px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12240i7DFE26EC84623392/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMG_20201210_190356.jpg" alt="IMG_20201210_190356.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 13:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532639#M150467</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2020-12-10T13:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532642#M150469</link>
      <description>&lt;P&gt;I'm not quite clear that I understand your issue.&lt;/P&gt;&lt;P&gt;Is there a reason you are using ! and CASE?&lt;/P&gt;&lt;P&gt;If there are only two options for the value of&amp;nbsp;&lt;SPAN&gt;state_desc you could use "IF" and avoid the !&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|eval state_description=if(state_desc="ONLINE", "system is online","system is offline")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 13:52:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532642#M150469</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-12-10T13:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532653#M150473</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; For below requirement i am use the case statement with ! Condition. Please assist.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_20201210_200002.jpg" style="width: 4000px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12243i532EE6F0B32F2091/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMG_20201210_200002.jpg" alt="IMG_20201210_200002.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 14:31:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532653#M150473</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2020-12-10T14:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532669#M150481</link>
      <description>&lt;P&gt;If I understand the question, I think the issue is that you are using ! which means "state_desc (IS NOT) = "ONLINE" in all of the case statements&lt;/P&gt;&lt;P&gt;try this, and see if it addresses your needs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|eval short_description=case(short_desc="OFFLINE","system is offline", short_desc="SUSPECT","system is suspect", short_desc="Recovery pending", "system is recovering", 1=1, "System is Online")
|eval isAlert=if(short_desc!="ONLINE",1,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The fist eval populates "short_description" with a description of each state.&lt;/P&gt;&lt;P&gt;The second eval creates a new field called "isAlert". For any condition where the short_desc does not contain "ONLINE" it will return a 1, but for a normal online condition it will contain a 0&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your aim is to fire an alert for an abnormal condition, you only need to worry about results in which isAlert=1, so adding&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|search isAlert=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;at the end will only show you results which indicate the system was not reporting "ONLINE"&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 16:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532669#M150481</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-12-10T16:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532698#M150494</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/23295"&gt;@nickhills&lt;/a&gt;&amp;nbsp; Yes i am agree, because multiple NOT condition in case statement are causing issue and all the not condition are consider only !=ONLINE condition value and create only single value.&lt;/P&gt;&lt;P&gt;Let me try your suggested SPL,&amp;nbsp;i will let you know if this work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 18:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532698#M150494</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2020-12-10T18:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532724#M150502</link>
      <description>&lt;P&gt;| eval sample=if(match(state_desc,"(ON|OFF)LINE"),"nothing", "what you want")&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 21:35:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532724#M150502</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-12-10T21:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532725#M150503</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;For multiple Not condition how match will work. Match command only work for true value. Please suggest when condition is not matched as suggested below.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 21:42:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532725#M150503</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2020-12-10T21:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532767#M150515</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults
| eval Alpha=split("ABCDEFGHIJKLMNOPQRSTUVWXYZ","")
| mvexpand Alpha
| where NOT (Alpha="A" OR Alpha="C" OR Alpha="X" OR Alpha="Z")&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 11 Dec 2020 10:19:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPL/m-p/532767#M150515</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-12-11T10:19:59Z</dc:date>
    </item>
  </channel>
</rss>

