<?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: Filter events in a time frame by a condition in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filter-events-in-a-time-frame-by-a-condition/m-p/668345#M229285</link>
    <description>&lt;LI-CODE lang="markup"&gt;index=sample_index path=*/sample_path* responseCode=200 OR responseCode=403
| timechart span=1m count by responseCode
| where '403' &amp;gt; 0&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 12 Nov 2023 09:53:44 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-11-12T09:53:44Z</dc:date>
    <item>
      <title>Filter events in a time frame by a condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-events-in-a-time-frame-by-a-condition/m-p/668342#M229283</link>
      <description>&lt;P&gt;I have the query to find the response code and count vs time (in 1 minute time interval) as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sample_index path=*/sample_path* 
	| bucket _time span=1m 
	| stats count by _time responseCode&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result shows the response code and count vs time for each minute. But I just need the events in those 1 minutes which have 403 response code along with other response codes and skip which doesn't have 403.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose during time1, if there are only events with response code 200, I don't need that in my result. But during time2, if there are events with response code 200 and 403, I need that in the result as time, response code, count.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2023 09:07:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-events-in-a-time-frame-by-a-condition/m-p/668342#M229283</guid>
      <dc:creator>RemyaT</dc:creator>
      <dc:date>2023-11-12T09:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Filter events in a time frame by a condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-events-in-a-time-frame-by-a-condition/m-p/668343#M229284</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245826"&gt;@RemyaT&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: do you want to count only events with response_code=403 or cout of all response_codes when there's at least one 403?&lt;/P&gt;&lt;P&gt;If the first, you can try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sample_index path=*/sample_path* response_code=403
| timechart span=1m count&lt;/LI-CODE&gt;&lt;P&gt;if the second&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sample_index path=*/sample_path* 
| bucket _time span=1m 
| stats 
   count(eval(response_code="200")) AS 200_count 
   count(eval(response_code="403")) AS 403_count 
   BY _time
| where 403_count &amp;gt;0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2023 09:18:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-events-in-a-time-frame-by-a-condition/m-p/668343#M229284</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-11-12T09:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filter events in a time frame by a condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-events-in-a-time-frame-by-a-condition/m-p/668345#M229285</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=sample_index path=*/sample_path* responseCode=200 OR responseCode=403
| timechart span=1m count by responseCode
| where '403' &amp;gt; 0&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 12 Nov 2023 09:53:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-events-in-a-time-frame-by-a-condition/m-p/668345#M229285</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-12T09:53:44Z</dc:date>
    </item>
  </channel>
</rss>

