<?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: how to deal with the 2 conflict conditions on where in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-deal-with-the-2-conflict-conditions-on-where/m-p/559187#M158872</link>
    <description>&lt;P&gt;Please provide some sample events for better understanding your scenario.&lt;/P&gt;&lt;P&gt;In general, you should be able to do conditional stats&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;stats count(eval((field1 != field2)&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 13 Jul 2021 02:06:04 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2021-07-13T02:06:04Z</dc:date>
    <item>
      <title>how to deal with the 2 conflict conditions on where</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-deal-with-the-2-conflict-conditions-on-where/m-p/559175#M158866</link>
      <description>&lt;P&gt;I have a query to send an alert, which have 2 conflict conditions:&lt;/P&gt;&lt;P&gt;|where alarm=1&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;generate some sum information only for alarm happens&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;|where alarm=0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;do something for cleaning the&lt;SPAN&gt;&amp;nbsp;alarm&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;|table *&lt;BR /&gt;But I only can do one of them, If I put where alarm=1 first, then I only can generate the alarm, otherwise, only can do clean alarm.&lt;/P&gt;&lt;P&gt;If I put where alarm=1 OR alarm=0, it cannot&amp;nbsp;&lt;SPAN&gt;generate some sum information for the alarm data. For example |eventstats list(x) etc.&lt;BR /&gt;&lt;BR /&gt;Any suggestion? Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 21:55:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-deal-with-the-2-conflict-conditions-on-where/m-p/559175#M158866</guid>
      <dc:creator>jenniferhao</dc:creator>
      <dc:date>2021-07-12T21:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to deal with the 2 conflict conditions on where</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-deal-with-the-2-conflict-conditions-on-where/m-p/559187#M158872</link>
      <description>&lt;P&gt;Please provide some sample events for better understanding your scenario.&lt;/P&gt;&lt;P&gt;In general, you should be able to do conditional stats&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;stats count(eval((field1 != field2)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Jul 2021 02:06:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-deal-with-the-2-conflict-conditions-on-where/m-p/559187#M158872</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2021-07-13T02:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to deal with the 2 conflict conditions on where</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-deal-with-the-2-conflict-conditions-on-where/m-p/559279#M158905</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem becomes how can get a list values with the condition?&amp;nbsp; for example, I need to get some values lists where alarm=1, but I also need to deal with alarm=0&lt;/P&gt;&lt;P&gt;| where alarm=1 OR alarm=0&lt;BR /&gt;&lt;BR /&gt;|eventstats list(create_session) as create_session list(Dn) as Dns by _time&amp;nbsp; //ONLY alarm==1&lt;BR /&gt;|evenststa list (IPs) as IPs by _time&amp;nbsp; &amp;nbsp;//ONLY alarm==0&lt;/P&gt;&lt;P&gt;|table IPs&amp;nbsp;create_session DNs&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 15:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-deal-with-the-2-conflict-conditions-on-where/m-p/559279#M158905</guid>
      <dc:creator>jenniferhao</dc:creator>
      <dc:date>2021-07-13T15:02:16Z</dc:date>
    </item>
  </channel>
</rss>

