<?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: two different time modifiers in one search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/two-different-time-modifiers-in-one-search/m-p/37670#M178666</link>
    <description>&lt;P&gt;thanks for the great answer, performs very well.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2013 18:08:09 GMT</pubDate>
    <dc:creator>p_splunk</dc:creator>
    <dc:date>2013-02-20T18:08:09Z</dc:date>
    <item>
      <title>two different time modifiers in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-different-time-modifiers-in-one-search/m-p/37668#M178664</link>
      <description>&lt;P&gt;The problem I'm facing is that I want a search that comes up with the possibility to set different time modifiers for different events.&lt;BR /&gt;
For examples i want all account-registrations of january and all item-buys of january AND february.&lt;/P&gt;

&lt;P&gt;I'm aware of the possibility of append (but it only works on results right, is there a similar function to append events?), but since this uses a subsearch which performs badly I'm searching for a different possibilty.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 12:18:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-different-time-modifiers-in-one-search/m-p/37668#M178664</guid>
      <dc:creator>p_splunk</dc:creator>
      <dc:date>2013-02-20T12:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: two different time modifiers in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-different-time-modifiers-in-one-search/m-p/37669#M178665</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;P&gt;Search over January + February&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(account-registrations) OR (item-buys)
| eval eventCategory = If(somecriteria,"Registration","Buy")
| eval month = if (_time &amp;lt; relative_time(now(),"@mon"),"Last","Current")
| where month = "Last" OR eventCategory="Buy"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't have enough information to write the actual search, or the criteria for the first &lt;CODE&gt;if&lt;/CODE&gt; function. But this is a start... and it does avoid subsearches.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 16:04:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-different-time-modifiers-in-one-search/m-p/37669#M178665</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-02-20T16:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: two different time modifiers in one search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-different-time-modifiers-in-one-search/m-p/37670#M178666</link>
      <description>&lt;P&gt;thanks for the great answer, performs very well.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 18:08:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-different-time-modifiers-in-one-search/m-p/37670#M178666</guid>
      <dc:creator>p_splunk</dc:creator>
      <dc:date>2013-02-20T18:08:09Z</dc:date>
    </item>
  </channel>
</rss>

