<?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: Why is my TIME_FORMAT regular expression in props.conf not working for an index time extraction? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366199#M108013</link>
    <description>&lt;P&gt;HI Welch,&lt;/P&gt;

&lt;P&gt;Thanks for the answer. There were 2 issues &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;MAX_TIMESTAMP_LOOKAHEAD &lt;/LI&gt;
&lt;LI&gt; [source::...mail] - i have put only 2 dots in my props.conf instead of 3. &lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Tue, 29 Sep 2020 13:18:32 GMT</pubDate>
    <dc:creator>sreejith2k2</dc:creator>
    <dc:date>2020-09-29T13:18:32Z</dc:date>
    <item>
      <title>Why is my TIME_FORMAT regular expression in props.conf not working for an index time extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366196#M108010</link>
      <description>&lt;P&gt;HI I am using following regular expression for the index time extraction in the props.conf. For some reason, it is not extracting properly.&lt;/P&gt;

&lt;P&gt;Event: 2017-03-15T11:30:02.609835+00:00  postfix/pickup[19819]: 89389386: uid=0 from user1&lt;/P&gt;

&lt;P&gt;I have defined my sourcetype as mail.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::...mail]
sourcetype=mail

[mail]
SHOULD_LINEMERGE = false
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%6Q%:z
TIME_PREFIX = ^
LINE_BREAKER = ([\r\n]+)
MAX_TIMESTAMP_LOOKAHEAD = 30
TRUNCATE=5000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, is there any websites i can test the TIME_FORMAT regular expression similar to regex101.com? &lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 12:46:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366196#M108010</guid>
      <dc:creator>sreejith2k2</dc:creator>
      <dc:date>2017-03-17T12:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my TIME_FORMAT regular expression in props.conf not working for an index time extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366197#M108011</link>
      <description>&lt;P&gt;The TIME_FORMAT attribute does not use regex strings.&lt;BR /&gt;
I'm not aware of any website for testing time format strings, but you can do it in a search window.  Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval TS="2017-03-15T11:30:02.609835+00:00" | eval epoch=strptime(TS,"%Y-%m-%dT%H:%M:%S.%6Q%:z") | table TS epoch
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the format string is bad, epoch will be null.&lt;/P&gt;

&lt;P&gt;Your format string works for me in search, but I haven't tried it at index time.  You might want to try this alternative: &lt;CODE&gt;"%Y-%m-%dT%H:%M:%S.%6N%z"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 13:08:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366197#M108011</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-03-17T13:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my TIME_FORMAT regular expression in props.conf not working for an index time extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366198#M108012</link>
      <description>&lt;P&gt;What is the source of the data?  is it /var/log/mail/*.log and how is it coming to the indexer?  Is there a UF&lt;/P&gt;

&lt;P&gt;Other things I noticed:&lt;BR /&gt;
increase MAX_TIMESTAMP_LOOKAHEAD = 32&lt;/P&gt;

&lt;P&gt;And it is always best to do your LINE_BREAKER like so&lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}+\d{2}:\d{2}&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366198#M108012</guid>
      <dc:creator>jwelch_splunk</dc:creator>
      <dc:date>2020-09-29T13:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my TIME_FORMAT regular expression in props.conf not working for an index time extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366199#M108013</link>
      <description>&lt;P&gt;HI Welch,&lt;/P&gt;

&lt;P&gt;Thanks for the answer. There were 2 issues &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;MAX_TIMESTAMP_LOOKAHEAD &lt;/LI&gt;
&lt;LI&gt; [source::...mail] - i have put only 2 dots in my props.conf instead of 3. &lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:18:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366199#M108013</guid>
      <dc:creator>sreejith2k2</dc:creator>
      <dc:date>2020-09-29T13:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my TIME_FORMAT regular expression in props.conf not working for an index time extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366200#M108014</link>
      <description>&lt;P&gt;Thanks Rich for your search. This search helped me in reducing the time in doing the testing.. &lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 09:35:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-TIME-FORMAT-regular-expression-in-props-conf-not/m-p/366200#M108014</guid>
      <dc:creator>sreejith2k2</dc:creator>
      <dc:date>2017-03-20T09:35:44Z</dc:date>
    </item>
  </channel>
</rss>

