<?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: Nested search to identify null counts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559191#M158875</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/141631"&gt;@pinalshah341&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this, start using from rex command before that it was for testing. if the count is &amp;lt;= 1 that means you have no Completed status associated to referenceId.&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;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="Successfully received message RECEIVED, payload={\"reference_id\":\"ABCD\"...} | Successfully published COMPLETED,  payload=(referenceId=ABCD,..." 
| makemv delim="|" _raw 
| mvexpand _raw 
| rex field=_raw "payload\=\{\\\"reference_id\\\":\\\"(?&amp;lt;ReferenceID&amp;gt;\w+)" 
| rex field=_raw "payload\=\(referenceId\=(?&amp;lt;ReferenceID&amp;gt;[^\,]+)" 
| stats count by ReferenceID 
| where count &amp;lt;= 1&lt;/LI-CODE&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;---&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and Accept Solution if this reply helps!&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jul 2021 03:05:18 GMT</pubDate>
    <dc:creator>venkatasri</dc:creator>
    <dc:date>2021-07-13T03:05:18Z</dc:date>
    <item>
      <title>Nested search to identify null counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559189#M158873</link>
      <description>&lt;P&gt;Below are my 2 log lines -&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.Successfully received message RECEIVED, payload={\"reference_id\":\"ABCD\"...}&lt;/P&gt;&lt;P&gt;2. Successfully published COMPLETED,&amp;nbsp; payload=(referenceId=ABCD,...&lt;/P&gt;&lt;P&gt;For the given referenceId ABCD, I want to search if "COMPLETED" message was published or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do nested search but not getting the right result -&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=xyz "Successfully *"&amp;nbsp; "COMPLETED"&amp;nbsp; | rex "referenceId=(?&amp;lt;referenceId&amp;gt;[^,]*).*" | join reference_id in [search index=xyz&amp;nbsp; "Successfully * message" AND ("RECEIVED") | rex "reference_id\\\\\":\\\\\"(?&amp;lt;reference_id&amp;gt;[^\\\\]*).*" | dedup reference_id | fields reference_id] | stats count by referenceId | where count &amp;lt; 1&lt;/P&gt;&lt;P&gt;I am expecting output like -&amp;nbsp;&lt;/P&gt;&lt;P&gt;ABCD 0&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 02:15:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559189#M158873</guid>
      <dc:creator>pinalshah341</dc:creator>
      <dc:date>2021-07-13T02:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Nested search to identify null counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559191#M158875</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/141631"&gt;@pinalshah341&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this, start using from rex command before that it was for testing. if the count is &amp;lt;= 1 that means you have no Completed status associated to referenceId.&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;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="Successfully received message RECEIVED, payload={\"reference_id\":\"ABCD\"...} | Successfully published COMPLETED,  payload=(referenceId=ABCD,..." 
| makemv delim="|" _raw 
| mvexpand _raw 
| rex field=_raw "payload\=\{\\\"reference_id\\\":\\\"(?&amp;lt;ReferenceID&amp;gt;\w+)" 
| rex field=_raw "payload\=\(referenceId\=(?&amp;lt;ReferenceID&amp;gt;[^\,]+)" 
| stats count by ReferenceID 
| where count &amp;lt;= 1&lt;/LI-CODE&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;---&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and Accept Solution if this reply helps!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 03:05:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559191#M158875</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-13T03:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nested search to identify null counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559192#M158876</link>
      <description>&lt;P&gt;Your query would be something like this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=xyz "Successfully *"  "COMPLETED" 
| rex field=_raw "payload\=\{\\\"reference_id\\\":\\\"(?&amp;lt;ReferenceID&amp;gt;\w+)" 
| rex field=_raw "payload\=\(referenceId\=(?&amp;lt;ReferenceID&amp;gt;[^\,]+)" 
| stats count by ReferenceID 
| where count &amp;lt;= 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;An upvote would be appreciated and Accept Solution if this reply helps!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 03:04:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559192#M158876</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-13T03:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Nested search to identify null counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559195#M158877</link>
      <description>&lt;P&gt;The problem with this approach is, if a "RECEIVED" message is published in last 1 min of the search range i.e. "COMPLETED" message is still in processing state, it will falsely show up in the table. To avoid that, I was going by the nested search approach. Let me know if this usecase can be fixed using the same query you suggested.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 03:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559195#M158877</guid>
      <dc:creator>pinalshah341</dc:creator>
      <dc:date>2021-07-13T03:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Nested search to identify null counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559202#M158878</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/141631"&gt;@pinalshah341&lt;/a&gt;&amp;nbsp;When you change the condition to | where count &amp;gt; 1 would only provide events completed.&lt;/P&gt;&lt;P&gt;&amp;lt;=1 would be either in progress or not completed. subsearch with join vs combining results would achieve the same results.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 04:04:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search-to-identify-null-counts/m-p/559202#M158878</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-13T04:04:08Z</dc:date>
    </item>
  </channel>
</rss>

