<?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: Splunk - Adjusting source file timestamp in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326627#M60701</link>
    <description>&lt;P&gt;You can do it in search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  ...| eval _time=if(host=server_2,_time+13,_time) | convert ctime(_time)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;_time equals (if server_2, add 13s to_time, else use _time)&lt;/P&gt;

&lt;P&gt;The eval will end up changing _time to epoch in visualizations... add the convert to swap it back to human readable format.&lt;/P&gt;

&lt;P&gt;You can do it in search time props like this (maybe, just not sure if it works with _time)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [host::server_2]
 EVAL-_time = _time+13
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
JKAT&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:40:55 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2020-09-29T15:40:55Z</dc:date>
    <item>
      <title>Splunk - Adjusting source file timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326626#M60700</link>
      <description>&lt;P&gt;Given:&lt;BR /&gt;
I have two log files (file_1, file_2)&lt;BR /&gt;
Each from a different server (server_1, server_2).&lt;BR /&gt;
The servers are not property synchronized via ntpd. (Example: server_1 is 13 seconds ahead of server_2.)&lt;BR /&gt;
I do not have the ability to adjust or correct the server times.&lt;BR /&gt;
I am the Splunk user, not the Splunk administrator.&lt;/P&gt;

&lt;P&gt;Problem: After ingesting each of the log files, the events are off by 13 seconds (obviously).&lt;/P&gt;

&lt;P&gt;Question: Can I adjust the _time for all events in source=file_2 by 13 seconds so the events line up correctly in search results, graphs, etc.?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326626#M60700</guid>
      <dc:creator>nageshkumarapp</dc:creator>
      <dc:date>2020-09-29T15:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk - Adjusting source file timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326627#M60701</link>
      <description>&lt;P&gt;You can do it in search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  ...| eval _time=if(host=server_2,_time+13,_time) | convert ctime(_time)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;_time equals (if server_2, add 13s to_time, else use _time)&lt;/P&gt;

&lt;P&gt;The eval will end up changing _time to epoch in visualizations... add the convert to swap it back to human readable format.&lt;/P&gt;

&lt;P&gt;You can do it in search time props like this (maybe, just not sure if it works with _time)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [host::server_2]
 EVAL-_time = _time+13
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
JKAT&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326627#M60701</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T15:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk - Adjusting source file timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326628#M60702</link>
      <description>&lt;P&gt;You will have to regularly check the time drift and update accordingly (or automate it) because unchecked system time will continue to drift further &lt;/P&gt;

&lt;P&gt;You COULD also use the index_time instead of _time for your searching, though that could have a little bit of latency (but hopefully not 13 seconds worth). That won't require the updating of the time drift.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 15:24:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326628#M60702</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-09-08T15:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk - Adjusting source file timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326629#M60703</link>
      <description>&lt;P&gt;I concur!!!&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 12:07:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Adjusting-source-file-timestamp/m-p/326629#M60703</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-09-10T12:07:51Z</dc:date>
    </item>
  </channel>
</rss>

