<?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 use two different search time ranges in one splunk rule? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492393#M194335</link>
    <description>&lt;P&gt;You are right. It worked with appendcols and subsearch &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Oct 2019 13:39:11 GMT</pubDate>
    <dc:creator>veromihaiu</dc:creator>
    <dc:date>2019-10-07T13:39:11Z</dc:date>
    <item>
      <title>How to use two different search time ranges in one splunk rule?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492390#M194332</link>
      <description>&lt;P&gt;I have the following scenario: I have to find events with certain specifications in the last 15 minutes, and the search result have to be compared (in the same rule) with the result of another search, which looks for exact same event but in the last 7 days. I have to see if the event found in the last 15 minutes, has happen in the past,how many times and if never happened, trigger an alert. How can I add to different search time in the same rule?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 07:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492390#M194332</guid>
      <dc:creator>veromihaiu</dc:creator>
      <dc:date>2019-10-03T07:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two different search time ranges in one splunk rule?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492391#M194333</link>
      <description>&lt;P&gt;Hey @veromihaiu&lt;/P&gt;

&lt;P&gt;You should be able to do this using appencol and timechart with stats quite easily as this will show the current events and then its split by the other events so you will be able to see it via a line graph or as event stats. Do you have a snippet of the data from both subsets and i can provide the answer for you?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 07:54:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492391#M194333</guid>
      <dc:creator>Sfry1981</dc:creator>
      <dc:date>2019-10-03T07:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two different search time ranges in one splunk rule?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492392#M194334</link>
      <description>&lt;P&gt;Hi veromihaiu,&lt;BR /&gt;
could you share your searches?&lt;BR /&gt;
Anyway, you have to identify some field or part of the _raw to compare searches results.&lt;BR /&gt;
E.g. if I have field1 and field2 as keys to compare, I can run something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index earliest=-7d latest=now [ search index=my_index earliest=-15m latest=now | fields field1 field2 ]
| ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With additional information, maybe it's possible to create a more performant search.&lt;BR /&gt;
E.G. you could schedule a search every hour to extract the key fields and archive results on a summary, e.g.:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index earliest=-h latest=now 
| fields _time field1 field2 
| collect index=my_summary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then you can search on the summary that it's a more performat way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_summary earliest=-7d latest=now [ search index=my_summary earliest=-15m latest=now | fields field1 field2 ]
| ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Remember that there's a limit of 50,000 results for subsearches, so check if in last 15 minutes you have more or less than 50,000 results.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 10:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492392#M194334</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-10-03T10:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two different search time ranges in one splunk rule?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492393#M194335</link>
      <description>&lt;P&gt;You are right. It worked with appendcols and subsearch &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 13:39:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492393#M194335</guid>
      <dc:creator>veromihaiu</dc:creator>
      <dc:date>2019-10-07T13:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two different search time ranges in one splunk rule?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492394#M194336</link>
      <description>&lt;P&gt;Thanks for the response! It worked!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 13:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492394#M194336</guid>
      <dc:creator>veromihaiu</dc:creator>
      <dc:date>2019-10-07T13:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two different search time ranges in one splunk rule?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492395#M194337</link>
      <description>&lt;P&gt;Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 13:41:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-two-different-search-time-ranges-in-one-splunk-rule/m-p/492395#M194337</guid>
      <dc:creator>veromihaiu</dc:creator>
      <dc:date>2019-10-07T13:41:01Z</dc:date>
    </item>
  </channel>
</rss>

