<?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 Multiple time frame search with one of the time frames not utilizing brackets within a macro in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Multiple-time-frame-search-with-one-of-the-time-frames-not/m-p/483860#M4316</link>
    <description>&lt;P&gt;I have a solution that uses api called macros that prefix the time frame to the search.&lt;/P&gt;

&lt;P&gt;ie. earliest="03/14/2019:00:00:00" latest="03/14/2019:23:59:59" &lt;CODE&gt;my_report(sample)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I need to modify this macro to search two different datasets for two different time spans (one summary, the other near realtime raw).&lt;/P&gt;

&lt;P&gt;The idea being that I can stitch the summary and raw together to create an up to the minute report.&lt;/P&gt;

&lt;P&gt;Contents of my_report macro&lt;BR /&gt;
index=old_summary_data $token1$ OR (index=new_raw_data earliest=@d latest=now $sample$)&lt;/P&gt;

&lt;P&gt;My expanded macro becomes this &lt;/P&gt;

&lt;P&gt;earliest="03/14/2019:00:00:00" latest="03/14/2019:23:59:59" index=old_summary_data $token1$ OR (index=new_raw_data earliest=@d latest=now $sample$)&lt;/P&gt;

&lt;P&gt;This will fail &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Error in 'litsearch' command: Unable to parse the search: Invalid time bounds in search: start=1568869200 &amp;gt; end=1568865600.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;This is due to not having a bracket preceeding the first "earliest" as per splunk docs : &lt;BR /&gt;
 (&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/SearchTimeModifiers" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/SearchTimeModifiers&lt;/A&gt;) &lt;/P&gt;

&lt;P&gt;example.(earliest="1/22/2018:17:00:00" latest="1/22/2018:18:00:00") OR (earliest="1/22/2018:19:00:00" latest="1/22/2018:20:00:00")&lt;/P&gt;

&lt;P&gt;Is there any way I can make a non-bracketed time frame and query honor the &lt;/P&gt;

&lt;P&gt;earliest="03/14/2019:00:00:00" latest="03/14/2019:23:59:59" index=old_summary_data $token1$ OR (index=new_raw_data earliest=@d latest=now $sample$)&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:13:46 GMT</pubDate>
    <dc:creator>Lucas_K</dc:creator>
    <dc:date>2020-09-30T02:13:46Z</dc:date>
    <item>
      <title>Multiple time frame search with one of the time frames not utilizing brackets within a macro</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Multiple-time-frame-search-with-one-of-the-time-frames-not/m-p/483860#M4316</link>
      <description>&lt;P&gt;I have a solution that uses api called macros that prefix the time frame to the search.&lt;/P&gt;

&lt;P&gt;ie. earliest="03/14/2019:00:00:00" latest="03/14/2019:23:59:59" &lt;CODE&gt;my_report(sample)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I need to modify this macro to search two different datasets for two different time spans (one summary, the other near realtime raw).&lt;/P&gt;

&lt;P&gt;The idea being that I can stitch the summary and raw together to create an up to the minute report.&lt;/P&gt;

&lt;P&gt;Contents of my_report macro&lt;BR /&gt;
index=old_summary_data $token1$ OR (index=new_raw_data earliest=@d latest=now $sample$)&lt;/P&gt;

&lt;P&gt;My expanded macro becomes this &lt;/P&gt;

&lt;P&gt;earliest="03/14/2019:00:00:00" latest="03/14/2019:23:59:59" index=old_summary_data $token1$ OR (index=new_raw_data earliest=@d latest=now $sample$)&lt;/P&gt;

&lt;P&gt;This will fail &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Error in 'litsearch' command: Unable to parse the search: Invalid time bounds in search: start=1568869200 &amp;gt; end=1568865600.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;This is due to not having a bracket preceeding the first "earliest" as per splunk docs : &lt;BR /&gt;
 (&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/SearchTimeModifiers" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/SearchTimeModifiers&lt;/A&gt;) &lt;/P&gt;

&lt;P&gt;example.(earliest="1/22/2018:17:00:00" latest="1/22/2018:18:00:00") OR (earliest="1/22/2018:19:00:00" latest="1/22/2018:20:00:00")&lt;/P&gt;

&lt;P&gt;Is there any way I can make a non-bracketed time frame and query honor the &lt;/P&gt;

&lt;P&gt;earliest="03/14/2019:00:00:00" latest="03/14/2019:23:59:59" index=old_summary_data $token1$ OR (index=new_raw_data earliest=@d latest=now $sample$)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:13:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Multiple-time-frame-search-with-one-of-the-time-frames-not/m-p/483860#M4316</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2020-09-30T02:13:46Z</dc:date>
    </item>
  </channel>
</rss>

