<?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: Back fill of data in timerange in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740585#M240458</link>
    <description>&lt;P&gt;For the first case, try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| append
    [| makeresults
    | addinfo
    | rename info_min_time as _time
    | fields _time
    | eval state="System unknown"]
| sort 0 - _time
| streamstats last(state) as previousState window=1 current=f
| eval state=if(state!="System unknown",state,if(previousState=="System Stop", "System Start", "System Stop"))&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 03 Mar 2025 12:17:30 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2025-03-03T12:17:30Z</dc:date>
    <item>
      <title>Back fill of data in timerange</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740570#M240452</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;&lt;P&gt;I'm having a logs which will be generated only where there is change in system,&lt;BR /&gt;&lt;BR /&gt;6:01:01 - System Stop&lt;BR /&gt;10:54:01 - System Start&lt;BR /&gt;&lt;SPAN&gt;13:09:04 - System Stop&lt;BR /&gt;&lt;/SPAN&gt;16:01:01 - System Start&lt;BR /&gt;17:01:01 - System Stop&lt;BR /&gt;&lt;BR /&gt;These are the logs.&lt;BR /&gt;&lt;BR /&gt;Lets say If I'm searchit it in a chart, for the timerange from 7Am - 4Pm&lt;BR /&gt;&lt;BR /&gt;the chart from 8Am until 10:54:01 Am is empty since the previous event was generated at 6:01:01, so there is a gap.&lt;BR /&gt;&lt;BR /&gt;I would like to fix this. In some cases only 2 values is been repeated, so we can take the one in present, the past can be its opposite.&lt;BR /&gt;&lt;BR /&gt;Eg -&amp;nbsp; At&amp;nbsp;10:54:01 - System Start, We have received this log, where the system is start, the previous one will be stop.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;These are fixed for some cased, I need two best solutions, only for this scenario, other for multiple values, like these&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;14:01:01 - System Started&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;17:54:01 - System reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;22:09:04 - System Stop&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;23:01:01 - System Started&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01:01:01 - System Stop&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;wheres here I'm getting three values like Started, Stop and reset.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 10:21:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740570#M240452</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2025-03-03T10:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Back fill of data in timerange</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740573#M240453</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236500"&gt;@smanojkumar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may have misunderstood, but&amp;nbsp;If you want the search to include the event at 6AM then you will need to change the earliest time within the search to cover this event.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Feel free to share a screenshot example of what you are seeing to help explain the difference to your expectation/intention.&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 10:23:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740573#M240453</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-03T10:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Back fill of data in timerange</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740575#M240454</link>
      <description>&lt;P&gt;Please clarify what you want Splunk to assume in the second case, for example, if the search was from 21:00, would you want Splunk to assume the previous state was "System reset" or "System Start"?&lt;/P&gt;&lt;P&gt;Do you want to search for a longer period of time to try and find the previous state, and then remove these results from the chart?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 10:28:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740575#M240454</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-03-03T10:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Back fill of data in timerange</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740577#M240455</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;17:54:01 - System reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;22:09:04 - System Stop&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;23:01:01 - System Started&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01:01:01 - System Stop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;In case of from 21:00, I need to take as System reset and followed by other values.&lt;BR /&gt;&lt;BR /&gt;Actually I just need to fill the value, even the logs weren't there in teh selcted timerange.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 11:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740577#M240455</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2025-03-03T11:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Back fill of data in timerange</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740578#M240456</link>
      <description>&lt;P&gt;How does Splunk know what the previous state was unless it is included in the search?&lt;/P&gt;&lt;P&gt;For example, if the first state is "System Stop" and the system was reset 3 days, or 3 weeks, or 3 months ago, what do you want Splunk to report?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 11:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740578#M240456</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-03-03T11:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Back fill of data in timerange</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740580#M240457</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thanks for asking!&lt;BR /&gt;&lt;BR /&gt;You are right.., It will be like, the next event will be received within 3 days, it wont take more time at wrost cases.&lt;BR /&gt;&lt;BR /&gt;I'm using those values in the chart, when we are searching with less time range, I can't see the logs of the timerange in that time range because of the gap in logs,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have listed two scenarious, As per the scenario1, The perevious value is just a opposite value of the next one.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Scenario 2 is bit hard, having multiple values, which can be generated before 3 days at wrost cases.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thansk!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 11:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740580#M240457</guid>
      <dc:creator>smanojkumar</dc:creator>
      <dc:date>2025-03-03T11:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Back fill of data in timerange</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740585#M240458</link>
      <description>&lt;P&gt;For the first case, try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| append
    [| makeresults
    | addinfo
    | rename info_min_time as _time
    | fields _time
    | eval state="System unknown"]
| sort 0 - _time
| streamstats last(state) as previousState window=1 current=f
| eval state=if(state!="System unknown",state,if(previousState=="System Stop", "System Start", "System Stop"))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Mar 2025 12:17:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-fill-of-data-in-timerange/m-p/740585#M240458</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-03-03T12:17:30Z</dc:date>
    </item>
  </channel>
</rss>

