<?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 modify _time when running summary index on a scheduled search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680130#M232489</link>
    <description>&lt;P&gt;You could manually set the _time value to the time when the scheduled search is run.&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval _time = now()&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 08 Mar 2024 21:46:04 GMT</pubDate>
    <dc:creator>marnall</dc:creator>
    <dc:date>2024-03-08T21:46:04Z</dc:date>
    <item>
      <title>How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680086#M232480</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;How to modify &lt;STRONG&gt;_time&lt;/STRONG&gt; when running &lt;U&gt;&lt;STRONG&gt;summary index&lt;/STRONG&gt;&lt;/U&gt; on &lt;STRONG&gt;a scheduled search&lt;/STRONG&gt;?&lt;BR /&gt;Please suggest. I appreciate your help. Thank you&lt;BR /&gt;&lt;BR /&gt;When running summary index on a scheduled search, by default, &lt;STRONG&gt;_time&amp;nbsp;&lt;/STRONG&gt;was set to &lt;STRONG&gt;info_min_time&lt;/STRONG&gt;, (start time of a search duration), instead of &lt;STRONG&gt;search_now (&lt;/STRONG&gt;time when the search run)&lt;BR /&gt;So, if at this current time I collect the summary index in the last 30 day , the _time will be set to the last 30 days , instead of current time.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The problem&lt;/STRONG&gt; is if I&lt;STRONG&gt; &lt;U&gt;run a search in the past 24 hours, the data won't show up&lt;/U&gt;&lt;/STRONG&gt; because the &lt;STRONG&gt;_time&lt;/STRONG&gt; is dated the last 30 days, so I had to search in the past 30 days&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 15:53:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680086#M232480</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-08T15:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680130#M232489</link>
      <description>&lt;P&gt;You could manually set the _time value to the time when the scheduled search is run.&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval _time = now()&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Mar 2024 21:46:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680130#M232489</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-03-08T21:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680132#M232490</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Have you tested it yourself?&lt;BR /&gt;I have tried your suggestion, but it did not work.&lt;BR /&gt;By default,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;_time&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;was set to&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;info_min_time&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Marius&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 21:47:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680132#M232490</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-08T21:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680149#M232493</link>
      <description>&lt;P&gt;Yes, I have a summary search which ends in:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval _time = _time + 3600&lt;/LI-CODE&gt;
&lt;P&gt;This set the timestamp of the summary-indexed events to one hour in the future. Then, when I search for the summarized events using the time filter of "Last 24 hours", it does not find any events (as expected). When I search for the summarized events with a custom time filter from +1m to +2h, then it does find the events, timestamped one hour in the future.&lt;/P&gt;
&lt;P&gt;Thus this method should be useful for setting the timestamps of your summarized index events to be in your expected search window.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Mar 2024 13:02:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680149#M232493</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-03-09T13:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680292#M232526</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/263556"&gt;@marnall&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried your suggestion, but the &lt;STRONG&gt;_time&lt;/STRONG&gt; always set to&lt;STRONG&gt; info_min_time&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;My search time is this morning:&amp;nbsp; &lt;SPAN&gt;Mar 11 2024 10:12:00 EDT&lt;BR /&gt;&lt;/SPAN&gt;Time Frame is: last 30 day, so&lt;BR /&gt;info_min_time (start time:&amp;nbsp;&lt;SPAN&gt;Feb 10 2024 00:00:00 EST)&lt;BR /&gt;&lt;/SPAN&gt;info_max_time (end time:&amp;nbsp;&lt;SPAN&gt;Mar 11 2024 00:00:00 EDT)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;_time is set to info_min_time as seen below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearningGuy_2-1710167666129.png" style="width: 770px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29707i3CED54C461E75DAC/image-dimensions/770x49?v=v2" width="770" height="49" role="button" title="LearningGuy_2-1710167666129.png" alt="LearningGuy_2-1710167666129.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you set your search time to to&lt;STRONG&gt; last 30 day&lt;/STRONG&gt; and run the &lt;STRONG&gt;collect&lt;/STRONG&gt; command with &lt;STRONG&gt;testmode=true &lt;/STRONG&gt;and share your results&lt;STRONG&gt;?&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| collect   index= summary     testmode=true addtime=true file=summary_test_1.stash_new   name="summary_test_1"   marker="report=\"summary_test_1\""&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;You should have _raw field that contains all the fields, including _time before getting pushed by collect command.&amp;nbsp; &amp;nbsp;See my below output. Please share yours.. Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearningGuy_3-1710168149417.png" style="width: 537px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29708i892073745AD12ABD/image-dimensions/537x147?v=v2" width="537" height="147" role="button" title="LearningGuy_3-1710168149417.png" alt="LearningGuy_3-1710168149417.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 14:44:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680292#M232526</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-11T14:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680445#M232572</link>
      <description>&lt;P&gt;Sure thing. For testing I am using this SPL: (time range set to "Last 30 Days")&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;index=_internal 
| table _time sourcetype
| head 5
| eval othertestfield="test1"
| eval _time = now() + 3600
| collect index=summary testmode=true addtime=true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It produces the following output:&lt;/P&gt;&lt;TABLE border="0" width="256" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64" height="19"&gt;_time&lt;/TD&gt;&lt;TD width="64"&gt;sourcetype&lt;/TD&gt;&lt;TD width="64"&gt;_raw&lt;/TD&gt;&lt;TD width="64"&gt;othertestfield&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;2024-03-12T22:50:05.000+01:00&lt;/TD&gt;&lt;TD&gt;splunkd&lt;/TD&gt;&lt;TD&gt;03/12/2024 22:50:05 +0100, info_min_time=1707606000.000, info_max_time=1710276605.000, info_search_time=1710276605.390, othertestfield=test1, orig_sourcetype=splunkd&lt;/TD&gt;&lt;TD&gt;test1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;2024-03-12T22:50:05.000+01:00&lt;/TD&gt;&lt;TD&gt;splunkd_access&lt;/TD&gt;&lt;TD&gt;03/12/2024 22:50:05 +0100, info_min_time=1707606000.000, info_max_time=1710276605.000, info_search_time=1710276605.390, othertestfield=test1, orig_sourcetype=splunkd_access&lt;/TD&gt;&lt;TD&gt;test1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;2024-03-12T22:50:05.000+01:00&lt;/TD&gt;&lt;TD&gt;splunkd_access&lt;/TD&gt;&lt;TD&gt;03/12/2024 22:50:05 +0100, info_min_time=1707606000.000, info_max_time=1710276605.000, info_search_time=1710276605.390, othertestfield=test1, orig_sourcetype=splunkd_access&lt;/TD&gt;&lt;TD&gt;test1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;2024-03-12T22:50:05.000+01:00&lt;/TD&gt;&lt;TD&gt;splunkd_access&lt;/TD&gt;&lt;TD&gt;03/12/2024 22:50:05 +0100, info_min_time=1707606000.000, info_max_time=1710276605.000, info_search_time=1710276605.390, othertestfield=test1, orig_sourcetype=splunkd_access&lt;/TD&gt;&lt;TD&gt;test1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;2024-03-12T22:50:05.000+01:00&lt;/TD&gt;&lt;TD&gt;splunkd_access&lt;/TD&gt;&lt;TD&gt;03/12/2024 22:50:05 +0100, info_min_time=1707606000.000, info_max_time=1710276605.000, info_search_time=1710276605.390, othertestfield=test1, orig_sourcetype=splunkd_access&lt;/TD&gt;&lt;TD&gt;test1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the search at 21:50 CET, and the _time field shows the current time plus 3600 seconds.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 20:53:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680445#M232572</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-03-12T20:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680477#M232580</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/263556"&gt;@marnall&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your suggestion worked fine.&amp;nbsp; &amp;nbsp;I accepted this as a solution. Thank you so much for your help.&lt;BR /&gt;It looks like the reason it didn't work earlier because I assigned&lt;BR /&gt;&amp;nbsp;eval _time = info_max_time, but I didn't put "addinfo", so it went to default value which is info_min_time.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Can you test on your end if _time set to info_min_time, if you don't use/remove the following eval?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Thanks&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;| eval _time = now() + 3600&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 03:42:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680477#M232580</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-13T03:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680597#M232628</link>
      <description>&lt;P&gt;Sure. When I remove that line, I get:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal 
| table _time sourcetype
| head 5
| eval othertestfield="test2"
| collect index=summary testmode=true addtime=true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When setting "Last 30 days" with the time picker, it produces another 5 rows, but I only paste the first one for brevity:&lt;/P&gt;&lt;TABLE border="0" width="256" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64" height="19"&gt;_time&lt;/TD&gt;&lt;TD width="64"&gt;sourcetype&lt;/TD&gt;&lt;TD width="64"&gt;_raw&lt;/TD&gt;&lt;TD width="64"&gt;othertestfield&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;2024-03-13T21:13:38.999+01:00&lt;/TD&gt;&lt;TD&gt;splunkd&lt;/TD&gt;&lt;TD&gt;03/13/2024 21:13:38 +0100, info_min_time=1707692400.000, info_max_time=1710361482.000, info_search_time=1710361482.294, othertestfield=test2, orig_sourcetype=splunkd&lt;/TD&gt;&lt;TD&gt;test2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;It seems the _time field is not set automatically to info_min_time, or else it should show something like 02/12/2024 in the _time part of the _raw field&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 20:29:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680597#M232628</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-03-13T20:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680626#M232644</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/263556"&gt;@marnall&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you again for your help&amp;nbsp;&lt;BR /&gt;I did some test, it appears that if we include &lt;STRONG&gt;_time&lt;/STRONG&gt; in&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;| table&lt;/STRONG&gt;,&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;_time within&amp;nbsp; _raw&lt;/STRONG&gt; will follow the &lt;STRONG&gt;_time&lt;/STRONG&gt; field, but if we use&amp;nbsp;&lt;STRONG&gt;| table without&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;_time,&lt;/STRONG&gt;&amp;nbsp;the _time will be set to&lt;STRONG&gt;&amp;nbsp;info_min_time&lt;BR /&gt;&lt;/STRONG&gt;This is also the reason why it didn't work when I tried your first suggestion.&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Can you try the following and let me know the result?&amp;nbsp; &amp;nbsp;&lt;BR /&gt;Thank you so much&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal 
| table sourcetype
| head 5
| eval othertestfield="test2"
| collect index=summary testmode=true addtime=true&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 01:48:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680626#M232644</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-14T01:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify _time when running summary index on a scheduled search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680881#M232698</link>
      <description>&lt;P&gt;Sure thing. When running that search over "Last 30 days", in the resulting _raw field I get:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;02/14/2024 00:00:00 +0100, info_min_time=1707865200.000, info_max_time=1710537355.000, info_search_time=1710537355.622, othertestfield=test2, orig_sourcetype=splunkd&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which does indeed look like the _time value has defaulted to info_min_time&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 21:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-time-when-running-summary-index-on-a-scheduled/m-p/680881#M232698</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-03-15T21:17:06Z</dc:date>
    </item>
  </channel>
</rss>

