<?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 TIME_FORMAT in props.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66839#M13408</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I use Splunk 4.1.4 and have difficulties to get the right timestamp from my event&lt;/P&gt;

&lt;P&gt;I have modified the props.conf&lt;/P&gt;

&lt;P&gt;[timetest]&lt;BR /&gt;
TIME_FORMAT = %Y%m%d%H%M%S%3N&lt;/P&gt;

&lt;P&gt;which successfully get the right time from this string &lt;BR /&gt;
20120921130215999&lt;/P&gt;

&lt;P&gt;If I would like the short year than there is a problem&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[timetest]&lt;BR /&gt;
TIME_FORMAT = %y%m%d%H%M%S%3N&lt;/P&gt;

&lt;P&gt;String = 120921130315999&lt;/P&gt;

&lt;P&gt;Here I get the following date&lt;BR /&gt;
4/26/08 2:01:43.159 PM &lt;/P&gt;

&lt;P&gt;Any hints why this happen ?&lt;BR /&gt;
Thanks &lt;BR /&gt;
Rob&lt;/P&gt;</description>
    <pubDate>Fri, 21 Sep 2012 11:33:37 GMT</pubDate>
    <dc:creator>RobertRi</dc:creator>
    <dc:date>2012-09-21T11:33:37Z</dc:date>
    <item>
      <title>TIME_FORMAT in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66839#M13408</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I use Splunk 4.1.4 and have difficulties to get the right timestamp from my event&lt;/P&gt;

&lt;P&gt;I have modified the props.conf&lt;/P&gt;

&lt;P&gt;[timetest]&lt;BR /&gt;
TIME_FORMAT = %Y%m%d%H%M%S%3N&lt;/P&gt;

&lt;P&gt;which successfully get the right time from this string &lt;BR /&gt;
20120921130215999&lt;/P&gt;

&lt;P&gt;If I would like the short year than there is a problem&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[timetest]&lt;BR /&gt;
TIME_FORMAT = %y%m%d%H%M%S%3N&lt;/P&gt;

&lt;P&gt;String = 120921130315999&lt;/P&gt;

&lt;P&gt;Here I get the following date&lt;BR /&gt;
4/26/08 2:01:43.159 PM &lt;/P&gt;

&lt;P&gt;Any hints why this happen ?&lt;BR /&gt;
Thanks &lt;BR /&gt;
Rob&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 11:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66839#M13408</guid>
      <dc:creator>RobertRi</dc:creator>
      <dc:date>2012-09-21T11:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66840#M13409</link>
      <description>&lt;P&gt;What happens is:&lt;BR /&gt;
The string gets parsed as epoch time, save for the last to 9's.&lt;/P&gt;

&lt;P&gt;1209211303159 = April 26, 2008 2pm (roughly)&lt;/P&gt;

&lt;P&gt;Why this happens is more of a mystery at this point. Do you also have a TIME_PREFIX set?&lt;/P&gt;

&lt;P&gt;Please update your question with a few sample events, and the props.conf settings for the sourcetype in question.&lt;/P&gt;

&lt;P&gt;Hope this sheds some light,&lt;/P&gt;

&lt;P&gt;/Kristian&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 12:20:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66840#M13409</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-09-21T12:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66841#M13410</link>
      <description>&lt;P&gt;I arrived at the same conclusion, but kristian.kolb beat me to it. Just want to point out that that's milliseconds from epoch, rather than seconds, in case someone's wondering.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2012 12:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66841#M13410</guid>
      <dc:creator>echalex</dc:creator>
      <dc:date>2012-09-21T12:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66842#M13411</link>
      <description>&lt;P&gt;originaly I would like to extract a Tivoli Timestamp which is&lt;/P&gt;

&lt;P&gt;1120924073559999&lt;BR /&gt;
1 = centaury&lt;BR /&gt;
12 = year&lt;BR /&gt;
09 = motnh&lt;BR /&gt;
24 = day&lt;BR /&gt;
07 = hour&lt;BR /&gt;
35 = minutes &lt;BR /&gt;
59 = seconds&lt;BR /&gt;
999 = milliseconds&lt;/P&gt;

&lt;P&gt;with the following props.conf&lt;/P&gt;

&lt;P&gt;[timetest]&lt;BR /&gt;
TIME_PREFIX = ^1&lt;BR /&gt;
TIME_FORMAT = %y%m%d%H%M%S%3N &lt;/P&gt;

&lt;P&gt;but this doesn't work and than I tried a couple of things &lt;/P&gt;

&lt;P&gt;For my test I had a normal textfile and echoed my strings in it&lt;/P&gt;

&lt;P&gt;STRING: 1120924070011999 test2&lt;/P&gt;

&lt;P&gt;Any Ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:29:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66842#M13411</guid>
      <dc:creator>RobertRi</dc:creator>
      <dc:date>2020-09-28T12:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66843#M13412</link>
      <description>&lt;P&gt;Now the timestamp will be set correct.&lt;/P&gt;

&lt;P&gt;Additional I have tried to manipulate the timestring in the raw message&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[resortdate]
REGEX = ^1\d{2}\d{2}\d{2}\d{2}\d{2}\d{2}\d{3}
FORMAT = $2-$3-20$1 $4:$5:$6.$7
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[timetest]
TIME_PREFIX = ^1
TIME_FORMAT = %y%m%d%H%M%S%3N
MAX_TIMESTAMP_LOOKAHEAD = 16
TRASFORMS-sortdate = resortdate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works fine but I see only the modified timestamp, not the message behind the timestamp.&lt;BR /&gt;
Is there anything to do ?&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Rob&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2012 12:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66843#M13412</guid>
      <dc:creator>RobertRi</dc:creator>
      <dc:date>2012-09-24T12:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66844#M13413</link>
      <description>&lt;P&gt;The reason you only see the timestamp is because you re-write the _raw field with ONLY the timestamp.&lt;/P&gt;

&lt;P&gt;Are you sure that the REGEX you mention above in transforms.conf is correctly written here? I was under the impression that you could only use the $n notation if you had capture groups in the regex.&lt;/P&gt;

&lt;P&gt;In that case you should have a final capture group &lt;/P&gt;

&lt;P&gt;(.*)$ &lt;/P&gt;

&lt;P&gt;that contains the rest of the event,to add as $8 in your FORMAT. &lt;/P&gt;

&lt;P&gt;Still I think this looks a bit of an awkward way of getting the desired results. Is there no way to alter the timestamps where they are written? &lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2012 13:39:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66844#M13413</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-09-24T13:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT in props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66845#M13414</link>
      <description>&lt;P&gt;thanks&lt;/P&gt;

&lt;P&gt;So I get it to work&lt;/P&gt;

&lt;P&gt;[resortdate]&lt;BR /&gt;
REGEX = (?i)^1(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{3})\s+(.*$)&lt;BR /&gt;
FORMAT = $2-$3-20$1 $4:$5:$6.$7 $8&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 07:18:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-in-props-conf/m-p/66845#M13414</guid>
      <dc:creator>RobertRi</dc:creator>
      <dc:date>2012-09-25T07:18:22Z</dc:date>
    </item>
  </channel>
</rss>

