<?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 prevent Splunk from converting time to date in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502813#M85645</link>
    <description>&lt;P&gt;you can use the &lt;CODE&gt;_time&lt;/CODE&gt; to be the index time in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [mysourcetype]
 DATETIME_CONFIG = CURRENT
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;now you have 2 time fields, _time and your field with HMS.MS&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2019 03:26:53 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2019-12-10T03:26:53Z</dc:date>
    <item>
      <title>How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502809#M85641</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have a log file like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;08:00:00.032 user     parameter: A[0]B[0]C: Action successful.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is just &lt;STRONG&gt;hour:minutes:seconds:mile seconds&lt;/STRONG&gt;&lt;BR /&gt;
As you see the only time of that event exists in log, and Splunk _time automatically converts this 08:00:00.032 to timestamp! &lt;BR /&gt;
This is the cause of the wrong date for events.&lt;/P&gt;

&lt;P&gt;For example, If I added today's log file to Splunk it will show events belong to 2018 ,2017, 2016 ...&lt;/P&gt;

&lt;P&gt;Any recommendation?&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 17:37:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502809#M85641</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-12-09T17:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502810#M85642</link>
      <description>&lt;P&gt;Do you have &lt;CODE&gt;TIME_FORMAT = %H:%M:%S.%3N&lt;/CODE&gt; in your props.conf?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 18:31:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502810#M85642</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-12-09T18:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502811#M85643</link>
      <description>&lt;P&gt;1-Add this props.conf&lt;BR /&gt;
2- remove fishbucket&lt;BR /&gt;
3- restart service &lt;/P&gt;

&lt;P&gt;Problem still remain.&lt;/P&gt;

&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 19:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502811#M85643</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-12-09T19:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502812#M85644</link>
      <description>&lt;P&gt;What should the correct timestamp be?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 22:06:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502812#M85644</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-12-09T22:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502813#M85645</link>
      <description>&lt;P&gt;you can use the &lt;CODE&gt;_time&lt;/CODE&gt; to be the index time in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [mysourcetype]
 DATETIME_CONFIG = CURRENT
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;now you have 2 time fields, _time and your field with HMS.MS&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 03:26:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502813#M85645</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-12-10T03:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502814#M85646</link>
      <description>&lt;P&gt;should I do something else after this change? e.g. restart splunk service?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 07:17:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502814#M85646</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-12-10T07:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502815#M85647</link>
      <description>&lt;P&gt;Hour:Minutes:Seconds:Millisecond&lt;BR /&gt;
08:00:00.122 = 08 AM&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 07:20:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502815#M85647</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-12-10T07:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502816#M85648</link>
      <description>&lt;P&gt;It is not very clear what your issue is here. Since the timestamp does not include a date, I believe Splunk will assume the date is today, and index all events as such.&lt;/P&gt;

&lt;P&gt;Do you have logs from multiple dates in your file, but without a date in the events? Or what exactly is your issue? Maybe show what the _time field looks like in Splunk and explain what is wrong with it.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 07:42:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502816#M85648</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-12-10T07:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502817#M85649</link>
      <description>&lt;P&gt;1-file contain only log of today.&lt;BR /&gt;
2-there is no date in log it just time 08:00:00.122 &lt;BR /&gt;
3-"_time" also show logs that belong this dates 2018 ,2017, 2016 ...&lt;/P&gt;

&lt;P&gt;exact problem is splunk convert time to date e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/opt/logs-20191210.log" | table _time

1   2018-02-02 09:04:04.042
2   2018-02-02 09:04:04.041
3   2018-02-02 09:04:04.041
4   2018-02-02 09:04:04.039
5   2018-02-02 09:04:04.039
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1   2017-07-13 08:43:56.928
2   2017-07-13 08:43:56.927
3   2017-07-13 08:43:56.925
4   2017-07-13 08:43:56.925
5   2017-07-13 08:43:56.920
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1   2016-12-26 08:48:35.986
2   2016-12-26 08:48:35.986
3   2016-12-26 08:48:35.984
4   2016-12-26 08:48:35.979
5   2016-12-26 08:48:35.979
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;1-here is the props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[logs-20191210-too_small]
TIME_FORMAT = %H:%M:%S.%3N 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;also try this one&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATETIME_CONFIG = CURRENT
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2- remove fishbucket&lt;BR /&gt;
3- restart service&lt;/P&gt;

&lt;P&gt;Problem still remain.&lt;/P&gt;

&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 12:34:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502817#M85649</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-12-10T12:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502818#M85650</link>
      <description>&lt;P&gt;Where did you deploy that props.conf? It should be on the first full splunk enterprise instance that processes the data (so on a HF or Indexer), not on a universal forwarder. Because if even &lt;CODE&gt;DATETIME_CONFIG = CURRENT&lt;/CODE&gt; isn't working, then it sounds like that props.conf is not taking effect.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 14:49:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502818#M85650</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-12-10T14:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502819#M85651</link>
      <description>&lt;P&gt;Logs and enterprise splunk locate on the single server and I just want to do this config affect to specific log. Not whole logs.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 15:19:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502819#M85651</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-12-10T15:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502820#M85652</link>
      <description>&lt;P&gt;What do you mean by that? Are you using some transforms to assign this &lt;CODE&gt;logs-20191210-too_small&lt;/CODE&gt; sourcetype to these events?&lt;/P&gt;

&lt;P&gt;If so: that will not work like this. Only indextime config for the original sourcetype will be applied. You can't override the sourcetype and then apply different indextime config based on that new sourcetype value.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 16:00:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502820#M85652</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-12-10T16:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent Splunk from converting time to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502821#M85653</link>
      <description>&lt;P&gt;There is no transforming here.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 16:34:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-Splunk-from-converting-time-to-date/m-p/502821#M85653</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2019-12-13T16:34:14Z</dc:date>
    </item>
  </channel>
</rss>

