<?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: Splunk search query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574595#M200240</link>
    <description>&lt;P&gt;check &lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-find-the-duration-for-order-submission-to-each-suborder/m-p/431769" target="_self"&gt;this page&lt;/A&gt; if it helps.&lt;/P&gt;&lt;P&gt;If not, could you please share some sample data.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please ensure to mock/anonymize any sensitive information in your data/code before posting on Splunk community.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Nov 2021 15:30:44 GMT</pubDate>
    <dc:creator>soumyasaha25</dc:creator>
    <dc:date>2021-11-11T15:30:44Z</dc:date>
    <item>
      <title>Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574592#M200238</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need splunk query to identify orders which are ordered but not submitted even after 72 hours&lt;/P&gt;&lt;P&gt;Any one help me on this&lt;/P&gt;&lt;P&gt;Thanks&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 15:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574592#M200238</guid>
      <dc:creator>mm12</dc:creator>
      <dc:date>2021-11-11T15:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574595#M200240</link>
      <description>&lt;P&gt;check &lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-find-the-duration-for-order-submission-to-each-suborder/m-p/431769" target="_self"&gt;this page&lt;/A&gt; if it helps.&lt;/P&gt;&lt;P&gt;If not, could you please share some sample data.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please ensure to mock/anonymize any sensitive information in your data/code before posting on Splunk community.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 15:30:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574595#M200240</guid>
      <dc:creator>soumyasaha25</dc:creator>
      <dc:date>2021-11-11T15:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574600#M200243</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/238710"&gt;@mm12&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;your request is just a little vague...&lt;/P&gt;&lt;P&gt;Anyway supposing that you have in one index events with an Order_Id field and an Order_Status field (with values Ordered and Submitted), you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=orders (Status="Ordered" OR Status="Submitted")
| stats 
     dc(Status) AS dc_status 
     values(Status) AS Status 
     earliest(_time) AS earliest 
     latest(_time) AS latest 
     BY Order_Id
| eval 
     Order_Status=if(dc_status=1 AND Status="Ordered","Not Submitted",if(latest-earliest&amp;gt;259200,"Submitted Late","Submitted"),
     Order_Date=strftime(earliest,"%Y-%m-%d %H:%M:%S"), 
     Submission_Date=dc_status=1 AND Status="Ordered","Not Submitted",strftime(latest,"%Y-%m-%d %H:%M:%S"))
| table Order_Id Order_Status Order_Date Submission_Date&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 15:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574600#M200243</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-11-11T15:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574716#M200275</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;thanks for the reply. But I have the below search query and I want to achieve the below use case.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I want to know what batches were ordered in the selected time period, and have EITHER not been submitted at all, OR were submitted more than 48 hours after being ordered.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;index= sfg_objects eventtype=Object_Ordered host=* NOT&lt;BR /&gt;[| search index= sfg_objects eventtype="Object_Submitted" host=*&lt;BR /&gt;| dedup Job_name&lt;BR /&gt;| fields Job_name]&lt;BR /&gt;| stats count by orders | sort 10 -count&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 09:15:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574716#M200275</guid>
      <dc:creator>mm12</dc:creator>
      <dc:date>2021-11-12T09:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574734#M200281</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/238710"&gt;@mm12&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;your search is correct but uses subsearches that have the limit of 50,000 results and uses more resources; so please, try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index= sfg_objects (eventtype=Object_Ordered OR eventtype="Object_Submitted")
| stats dc(eventtype) AS dc_eventtypes values(eventtype) AS eventtype BY Job_name
| where dc_eventtypes=1 and eventtype=Object_Ordered&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 13:05:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574734#M200281</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-11-12T13:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574765#M200290</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; In my query it checks for the orders that were not submitted at all. But I should check for the&amp;nbsp; orders that were not submitted only after 48 hours giving&amp;nbsp; 2 days time to process the orders.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 16:18:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574765#M200290</guid>
      <dc:creator>mm12</dc:creator>
      <dc:date>2021-11-12T16:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574801#M200297</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/238710"&gt;@mm12&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please see again my first solution:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=orders (Status="Ordered" OR Status="Submitted")
| stats 
     dc(Status) AS dc_status 
     values(Status) AS Status 
     earliest(_time) AS earliest 
     latest(_time) AS latest 
     BY Order_Id
| eval 
     Order_Status=if(dc_status=1 AND Status="Ordered","Ordered But Not Submitted",if(dc_status=2 AND (latest-earliest&amp;gt;172800),"Ordered But Submitted Late","Ordered and Submitted"),
     Order_Date=strftime(earliest,"%Y-%m-%d %H:%M:%S"), 
     Submission_Date=dc_status=1 AND Status="Ordered","Not Submitted",strftime(latest,"%Y-%m-%d %H:%M:%S"))
| table Order_Id Order_Status Order_Date Submission_Date&lt;/LI-CODE&gt;&lt;P&gt;Using it, you have:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The Order_Id,&lt;/LI&gt;&lt;LI&gt;the Status of your orders:&lt;UL&gt;&lt;LI&gt;Ordered and Submitted (if you have both Ordered and Submitted),&lt;/LI&gt;&lt;LI&gt;Ordered but Not Submitted&amp;nbsp;(if you have Ordered but Not Submitted),&lt;/LI&gt;&lt;LI&gt;Ordered but late Submitted if you have&amp;nbsp;both Ordered and Submitted but the difference between the dates is more than 48 hours;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;the Order Date,&lt;/LI&gt;&lt;LI&gt;the Submission Date.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If you want to highligh only one of these Statuses you can modify my complete search or filter results.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2021 07:11:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574801#M200297</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-11-13T07:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574802#M200298</link>
      <description>&lt;PRE&gt;index=sfg_objects eventtype=Object_Ordered OR eventtype=Object_Submitted&lt;BR /&gt;| stats values(eventtype) as types max(_time) as maxtime min(_time) as mintime by Job_name&lt;BR /&gt;| where NOT (eventtype="Object_Submitted" OR maxtime-mintime&amp;lt;48*3600)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2021 08:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/574802#M200298</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-11-13T08:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/575482#M200538</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/238710"&gt;@mm12&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 16:05:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-query/m-p/575482#M200538</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-11-18T16:05:47Z</dc:date>
    </item>
  </channel>
</rss>

