<?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 can I find results only iff the previous queries returns results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-results-only-iff-the-previous-queries-returns/m-p/640720#M221992</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232673"&gt;@yk010123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It usually easier to help when there are some example events provided, but based on what you've shown in the SPL something like this should work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(method!=GET process="start") OR (process=end AND status=500)
| eval region=coalesce(region, "none") ``` account for end event not having a region ```
      ,type=if(process="start", "start", "end")
| stats count BY _time type region
| timechart span=1m
    sum(eval(type="start")) AS start
    sum(eval(type="end")) AS end
  BY region
| timechart per_second(*)&lt;/LI-CODE&gt;&lt;P&gt;One query that combines the results into one table/graph.&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 01:07:16 GMT</pubDate>
    <dc:creator>yeahnah</dc:creator>
    <dc:date>2023-04-20T01:07:16Z</dc:date>
    <item>
      <title>How can I find results only iff the previous queries returns results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-results-only-iff-the-previous-queries-returns/m-p/640709#M221986</link>
      <description>&lt;P&gt;I calculate the requests per second for my application using the following query:&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;method!=GET process="start"
| timechart count by region limit=0
| timechart per_second(*)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also calculate the number of errors my application is producing using the following separate query&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;process=end AND status=500
| timechart count
| timechart per_second(*)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to find a query that will answer when my application "breaks", or in other words, what is the requests per second that causes my application to have more than N errors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 23:03:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-results-only-iff-the-previous-queries-returns/m-p/640709#M221986</guid>
      <dc:creator>yk010123</dc:creator>
      <dc:date>2023-04-19T23:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find results only iff the previous queries returns results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-results-only-iff-the-previous-queries-returns/m-p/640720#M221992</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232673"&gt;@yk010123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It usually easier to help when there are some example events provided, but based on what you've shown in the SPL something like this should work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(method!=GET process="start") OR (process=end AND status=500)
| eval region=coalesce(region, "none") ``` account for end event not having a region ```
      ,type=if(process="start", "start", "end")
| stats count BY _time type region
| timechart span=1m
    sum(eval(type="start")) AS start
    sum(eval(type="end")) AS end
  BY region
| timechart per_second(*)&lt;/LI-CODE&gt;&lt;P&gt;One query that combines the results into one table/graph.&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 01:07:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-find-results-only-iff-the-previous-queries-returns/m-p/640720#M221992</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-04-20T01:07:16Z</dc:date>
    </item>
  </channel>
</rss>

