<?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 use AND condition? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632139#M219577</link>
    <description>&lt;P&gt;Thanks For solution .&lt;BR /&gt;actually can i calculate multiple count in single query&amp;nbsp;&lt;BR /&gt;my problem statement is i would like to setup alert based on number of result less that for each service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=* "ORC from ROUTER completed" namespace="dk1692-b" | stats count&amp;nbsp; ---&amp;nbsp; Count should be90&lt;BR /&gt;&lt;BR /&gt;index=* "ORC from SDS completed." namespace="dk1399-b" | stats count&amp;nbsp; ---&amp;nbsp; &amp;nbsp;Count should be 60&lt;/P&gt;&lt;P&gt;index=* "ORC from FCS completed"&amp;nbsp; namespace="dk1371-b" | stats count --&amp;nbsp;Count should be 60&lt;/P&gt;&lt;P&gt;so i would like to setup alert based on above , rather that setup 3 different alerts , how can i form single query and manage threshold&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Feb 2023 05:58:45 GMT</pubDate>
    <dc:creator>bhaskar5428</dc:creator>
    <dc:date>2023-02-24T05:58:45Z</dc:date>
    <item>
      <title>How to use AND condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632127#M219571</link>
      <description>&lt;P&gt;index=* "ORC from FCS completed" namespace="dk1371-b"&lt;BR /&gt;index=* "ORC from ROUTER completed" namespace="dk1692-b"&lt;BR /&gt;index=* "ORC from SDS completed." namespace="dk1399-b"&lt;/P&gt;
&lt;P&gt;Above query working fine ,&lt;/P&gt;
&lt;P&gt;------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;however when am using below its not providing any data&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index=* "ORC from FCS completed" namespace="dk1371-b" AND namespace="dk1399-b"&lt;/P&gt;
&lt;P&gt;Because ORC from "" is different for namespaces&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have below problem statement&lt;/P&gt;
&lt;P&gt;1. I would like to prepare single query where i can use all namespaces like&amp;nbsp;dk1371-b , dk1399-b etc . . . .&lt;/P&gt;
&lt;P&gt;2 . In single search i would like have FCS/SDS&amp;nbsp;&lt;BR /&gt;"ORC from FCS completed"&lt;BR /&gt;"ORC from SDS completed"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 04:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632127#M219571</guid>
      <dc:creator>bhaskar5428</dc:creator>
      <dc:date>2023-02-24T04:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AND condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632134#M219575</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244235"&gt;@bhaskar5428&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please try below two options,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* ("ORC from FCS completed" OR "ORC from SDS completed." OR "ORC from ROUTER completed") namespace IN ("dk1692-b","dk1399-b","dk1371-b")&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* "ORC from * completed"  namespace IN ("dk1692-b","dk1399-b","dk1371-b")&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 Feb 2023 04:19:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632134#M219575</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2023-02-24T04:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AND condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632139#M219577</link>
      <description>&lt;P&gt;Thanks For solution .&lt;BR /&gt;actually can i calculate multiple count in single query&amp;nbsp;&lt;BR /&gt;my problem statement is i would like to setup alert based on number of result less that for each service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=* "ORC from ROUTER completed" namespace="dk1692-b" | stats count&amp;nbsp; ---&amp;nbsp; Count should be90&lt;BR /&gt;&lt;BR /&gt;index=* "ORC from SDS completed." namespace="dk1399-b" | stats count&amp;nbsp; ---&amp;nbsp; &amp;nbsp;Count should be 60&lt;/P&gt;&lt;P&gt;index=* "ORC from FCS completed"&amp;nbsp; namespace="dk1371-b" | stats count --&amp;nbsp;Count should be 60&lt;/P&gt;&lt;P&gt;so i would like to setup alert based on above , rather that setup 3 different alerts , how can i form single query and manage threshold&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 05:58:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632139#M219577</guid>
      <dc:creator>bhaskar5428</dc:creator>
      <dc:date>2023-02-24T05:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AND condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632152#M219583</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244235"&gt;@bhaskar5428&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please try below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* ("ORC from FCS completed" OR "ORC from SDS completed." OR "ORC from ROUTER completed") namespace IN ("dk1692-b","dk1399-b","dk1371-b")
| eval dk1692=if(searchmatch("\"ORC from ROUTER completed\" namespace=dk1692-b"),1,0) 
| eval dk1399=if(searchmatch("\"ORC from SDS completed\" namespace=dk1399-b"),1,0) 
| eval dk1371=if(searchmatch("\"ORC from FCS completed\"  namespace=dk1371-b"),1,0)  
| stats sum(dk*) as dk*
| search dk1692&amp;gt;90 OR dk1399&amp;gt;60 OR dk1371&amp;gt;60&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 08:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632152#M219583</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2023-02-24T08:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AND condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632157#M219585</link>
      <description>&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;index=* ("ORC from FCS completed" OR "ORC from SDS completed." OR "ORC from ROUTER completed") namespace IN ("dk1692-b","dk1399-b","dk1371-b")&lt;BR /&gt;| eval dk1692=if(searchmatch("\"ORC from ROUTER completed\" namespace=dk1692-b"),1,0)&lt;BR /&gt;| eval dk1399=if(searchmatch("\"ORC from SDS completed\" namespace=dk1399-b"),1,0)&lt;BR /&gt;| eval dk1371=if(searchmatch("\"ORC from FCS completed\" namespace=dk1371-b"),1,0)&lt;BR /&gt;| stats sum(dk*) as dk*&lt;BR /&gt;| search dk1692&amp;gt;90 OR dk1399&amp;gt;60 OR dk1371&amp;gt;60&lt;/P&gt;&lt;P&gt;i would like to save and set this alert , for example if count for dk1692 less than 90 , email alert should receive.&lt;/P&gt;&lt;P&gt;Am able to setup the same as part of individual alert , but how can i setup alert for multiple conditions&amp;nbsp;&lt;/P&gt;&lt;P&gt;is this possible ?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 08:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632157#M219585</guid>
      <dc:creator>bhaskar5428</dc:creator>
      <dc:date>2023-02-24T08:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AND condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632196#M219605</link>
      <description>&lt;P&gt;1. Don't search over index=* unless you really have your data all over your indexes. Limiting by index is one of the most efficient way of improving performance&lt;/P&gt;&lt;P&gt;2. You're using AND whereas it seems that you want OR&lt;/P&gt;&lt;PRE&gt;("ORC from FCS completed" namespace="dk1371-b") OR &lt;BR /&gt;(index=* "ORC from ROUTER completed" namespace="dk1692-b") OR&lt;BR /&gt;(index=* "ORC from SDS completed." namespace="dk1399-b")&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Feb 2023 13:12:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-AND-condition/m-p/632196#M219605</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-02-24T13:12:29Z</dc:date>
    </item>
  </channel>
</rss>

