<?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 handle &amp;quot;no results found&amp;quot; in subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-handle-quot-no-results-found-quot-in-subsearch/m-p/503162#M140008</link>
    <description>&lt;P&gt;Use &lt;CODE&gt;appendpipe&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval DisruptionInSeconds = [ my subsearch that returns the delta between two events 
| sort - _time 
| stats sum(timeDeltaS) as search | eval search ="\"".search."\"" 
| appendpipe [ stats count | eval search="0" | where count==0 | fields - count ] ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 26 Mar 2020 13:04:38 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-03-26T13:04:38Z</dc:date>
    <item>
      <title>How to handle "no results found" in subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-handle-quot-no-results-found-quot-in-subsearch/m-p/503161#M140007</link>
      <description>&lt;P&gt;Hi all, &lt;/P&gt;

&lt;P&gt;I have a subsearch that returns me the delta between two events. The problem is, sometimes the two events I´m looking for don´t exist. This results in the following Error in 'eval' command: The expression is malformed. An unexpected character is reached at ')'.&lt;/P&gt;

&lt;P&gt;The subsearch looks like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval DisruptionInSeconds = [ my subsearch that returns the delta between two events 
| sort - _time 
| stats sum(timeDeltaS) as search | eval search ="\"".search."\"" ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If these two events don´t exist, the search should return 0 (not NULL). How do I do that? &lt;/P&gt;

&lt;P&gt;Thanks in advance for your help. &lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 10:18:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-handle-quot-no-results-found-quot-in-subsearch/m-p/503161#M140007</guid>
      <dc:creator>tsa_asap</dc:creator>
      <dc:date>2020-03-26T10:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle "no results found" in subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-handle-quot-no-results-found-quot-in-subsearch/m-p/503162#M140008</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;appendpipe&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval DisruptionInSeconds = [ my subsearch that returns the delta between two events 
| sort - _time 
| stats sum(timeDeltaS) as search | eval search ="\"".search."\"" 
| appendpipe [ stats count | eval search="0" | where count==0 | fields - count ] ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Mar 2020 13:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-handle-quot-no-results-found-quot-in-subsearch/m-p/503162#M140008</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-03-26T13:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle "no results found" in subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-handle-quot-no-results-found-quot-in-subsearch/m-p/503163#M140009</link>
      <description>&lt;P&gt;That works. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 13:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-handle-quot-no-results-found-quot-in-subsearch/m-p/503163#M140009</guid>
      <dc:creator>tsa_asap</dc:creator>
      <dc:date>2020-03-26T13:08:05Z</dc:date>
    </item>
  </channel>
</rss>

