<?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: Fixed timestamp location in event. How to extract? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173305#M34853</link>
    <description>&lt;P&gt;I suggest you use the file input wizard to help you with your props.conf.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Save a file on your indexer with a few lines of your log&lt;/LI&gt;
&lt;LI&gt;Go to Settings &amp;gt; Data inputs &amp;gt; Files &amp;amp; directories &amp;gt; new&lt;/LI&gt;
&lt;LI&gt;Browse to the location of the file and choose next&lt;/LI&gt;
&lt;LI&gt;Expand the "Advanced" tab on the left, and add your attributes&lt;/LI&gt;
&lt;LI&gt;Test those attributes until they work for you&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Try skipping the &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD=6&lt;/CODE&gt; and &lt;CODE&gt;LINE_BREAKER= .{775}()&lt;/CODE&gt; your first pass.&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2015 21:09:37 GMT</pubDate>
    <dc:creator>aholzer</dc:creator>
    <dc:date>2015-05-06T21:09:37Z</dc:date>
    <item>
      <title>Fixed timestamp location in event. How to extract?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173301#M34849</link>
      <description>&lt;P&gt;I have a timestamp in %Y%m format - not ideal. Here is an event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  A       201301    08433 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The timestamp here is 201301.&lt;/P&gt;

&lt;P&gt;The first digit of the timestamp (e.g 2 above) is always in the 15th position of the events.&lt;/P&gt;

&lt;P&gt;How can I get Splunk to recognise this timestamp at index time? I would want to snap the day in the timestamp to the first of each month (e.g 01/01/2013 above).&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 19:19:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173301#M34849</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2015-05-06T19:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed timestamp location in event. How to extract?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173302#M34850</link>
      <description>&lt;P&gt;If you want to extract this as the _time of your event, what you want is a combination of the following attributes in your props.conf (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;documentation for props.conf&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX=(.){15}
MAX_TIMESTAMP_LOOKAHEAD=6
TIME_FORMAT=%Y%m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;UL&gt;
&lt;LI&gt;The time prefix tells it to skip the first 15 characters.&lt;/LI&gt;
&lt;LI&gt;The max timestamp lookahead tells it that the timestamp is found within 6 characters of the end of the time prefix.&lt;/LI&gt;
&lt;LI&gt;The time format tells it to expect the timestamp in "yyyymm" format&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;If you are extracting this as a new field at search time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;amp;lt;base search&amp;amp;gt; | rex "(.){15}(?P&amp;amp;lt;your_new_time_field&amp;amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or save it as a field extraction using the field extractor GUI feature.&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 19:49:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173302#M34850</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2015-05-06T19:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed timestamp location in event. How to extract?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173303#M34851</link>
      <description>&lt;P&gt;Note that the &lt;CODE&gt;&amp;amp;lt;&lt;/CODE&gt; should be replaced with a less than sign (&amp;lt;) and the &lt;CODE&gt;&amp;amp;gt;&lt;/CODE&gt; should be replaced with a greater than sign (&amp;gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 19:50:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173303#M34851</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2015-05-06T19:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed timestamp location in event. How to extract?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173304#M34852</link>
      <description>&lt;P&gt;So this was my props.conf - but it fails to extract the timestamp&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%Y%m
TIME_PREFIX=(.){15}
MAX_TIMESTAMP_LOOKAHEAD=6
SHOULD_LINEMERGE=false
LINE_BREAKER= .{775}()


  A       201301    08433           11                1                             34105                                            201  1    06  X1 4                          32  0502 2   074          01  2    3                         13021                      1308  172  Y00000000    N                  YNNYNNN NXXY01    1   212       NN NNNNNNN  2 2  NNNNN NNNNNN 2     2  1       24U    224 2NNNNNN1Y64 094885  1            F 05  201233   33041       1530    042  NNYNNNN         NNNNNNNNNNNN22       2    2  2 2  NYY42.06999999999999999245262649           11111111111111111111 1111111 111111111111 111111  1111111111111111111111111111 1   11              1  111111111    1   111            1 1      1     1  1            11                11       1    1  1 1    
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 May 2015 19:57:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173304#M34852</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2015-05-06T19:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed timestamp location in event. How to extract?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173305#M34853</link>
      <description>&lt;P&gt;I suggest you use the file input wizard to help you with your props.conf.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Save a file on your indexer with a few lines of your log&lt;/LI&gt;
&lt;LI&gt;Go to Settings &amp;gt; Data inputs &amp;gt; Files &amp;amp; directories &amp;gt; new&lt;/LI&gt;
&lt;LI&gt;Browse to the location of the file and choose next&lt;/LI&gt;
&lt;LI&gt;Expand the "Advanced" tab on the left, and add your attributes&lt;/LI&gt;
&lt;LI&gt;Test those attributes until they work for you&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Try skipping the &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD=6&lt;/CODE&gt; and &lt;CODE&gt;LINE_BREAKER= .{775}()&lt;/CODE&gt; your first pass.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 21:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173305#M34853</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2015-05-06T21:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed timestamp location in event. How to extract?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173306#M34854</link>
      <description>&lt;P&gt;@himynamesdave,&lt;/P&gt;

&lt;P&gt;Did the above comment help you out at all? If not, can you provide a few lines of samples?&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2015 17:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Fixed-timestamp-location-in-event-How-to-extract/m-p/173306#M34854</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2015-05-11T17:19:43Z</dc:date>
    </item>
  </channel>
</rss>

