<?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 Splunk not parsing the correct datetime? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242161#M46945</link>
    <description>&lt;P&gt;Does it make a difference if you use a capture group instead of a non capture group there? As in: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?:"[^"]*",){3}"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 01 Jul 2016 15:54:49 GMT</pubDate>
    <dc:creator>jplumsdaine22</dc:creator>
    <dc:date>2016-07-01T15:54:49Z</dc:date>
    <item>
      <title>Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242153#M46937</link>
      <description>&lt;P&gt;I have logs that contain the following datetime format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;29-06-2016_00-08-17
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The props contain:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[odb]
TIME_PREFIX = ".+",".+","
TIME_FORMAT = %d-%m-%Y_%H-%M-%S
MAX_TIMESTAMP_LOOKAHEAD = 50
KV_MODE = none
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Structured
disabled = false
pulldown_type = true
SEDCMD-01_change_delims_in_oracle_logs = s/\|;\|/,/g
SEDCMD-02_remove_the_end = s/"\|\|\?--END---\?\|\|//g
REPORT-set_delimiters_oracle_logs = REPORT-delims_odb_logs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What could be the problem?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2016 21:06:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242153#M46937</guid>
      <dc:creator>dpanych</dc:creator>
      <dc:date>2016-06-30T21:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242154#M46938</link>
      <description>&lt;P&gt;Not sure if I'm reading that correctly, but are you replacing the delimiters in the raw text from "|;|" to ","?  If so, is that the same comma you're expecting to be there for the time prefix?  If it is, I'm wondering if the timestamp recognition happens before sedcmd is applied?&lt;/P&gt;

&lt;P&gt;Also, be sure 50 characters is enough to look ahead (assuming you did, but thought I'd mention it).&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 00:41:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242154#M46938</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2016-07-01T00:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242155#M46939</link>
      <description>&lt;P&gt;I found a similar problem: time recognition is done before the character replacing.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:40:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242155#M46939</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-07-01T06:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242156#M46940</link>
      <description>&lt;P&gt;Can you post a sample event as well? &lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 10:38:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242156#M46940</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2016-07-01T10:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242157#M46941</link>
      <description>&lt;P&gt;We cannot say without you posting a sample event.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 13:45:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242157#M46941</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-01T13:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242158#M46942</link>
      <description>&lt;P&gt;Here's what the logs looks like after the sed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"host1","MON","LOGOFF","30-06-2016_11-15-01","","0"
"host2","ODS","UPDATE","30-06-2016_12-51-05","UPDATE DS_ATTRSTORE SET ATTRVAL = :B1 WHERE ENTRY = :B2 AND ATTRNAME = 'modname'","0"
"host3","ODS","UPDATE","30-06-2016_08-28-43","UPDATE DS_ATTRSTORE SET ATTRVER = :B4 || CHR(94) || :B5 || CHR(94) || :B6 , ATTRVAL = :B3 , ATTRKIND = :B2 , ATTRSTYPE = :B1 WHERE ENTRY = :B8 AND ATTRNAME = :B7","0"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Jul 2016 15:27:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242158#M46942</guid>
      <dc:creator>dpanych</dc:creator>
      <dc:date>2016-07-01T15:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242159#M46943</link>
      <description>&lt;P&gt;So I updated the time prefix to include the delims before the sed, TIME_PREFIX = ".+"|;|".+"|;|".+"|;|"&lt;BR /&gt;
and still no luck.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 15:41:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242159#M46943</guid>
      <dc:creator>dpanych</dc:creator>
      <dc:date>2016-07-01T15:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242160#M46944</link>
      <description>&lt;P&gt;Your &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; is wrong.  Try these:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = ("[^"]*",){3}"
MAX_TIMESTAMP_LOOKAHEAD = 19
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Jul 2016 15:49:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242160#M46944</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-01T15:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242161#M46945</link>
      <description>&lt;P&gt;Does it make a difference if you use a capture group instead of a non capture group there? As in: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?:"[^"]*",){3}"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Jul 2016 15:54:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242161#M46945</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2016-07-01T15:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242162#M46946</link>
      <description>&lt;P&gt;In this case, they are the same.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 15:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242162#M46946</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-01T15:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242163#M46947</link>
      <description>&lt;P&gt;Also, this needs to be deployed to your indexers, the splunk instances must be restarted, and only newly-indexed (post-restart) data will be effected (bad events will stay bad).&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 16:02:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242163#M46947</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-01T16:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242164#M46948</link>
      <description>&lt;P&gt;I'm no regex guru, but how do I make the regex above work with the |;| delims? ----    "aaa"|;|"OIM"|;|"DELETE"|;|"29-06-2016_01-53-16"&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 16:11:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242164#M46948</guid>
      <dc:creator>dpanych</dc:creator>
      <dc:date>2016-07-01T16:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242165#M46949</link>
      <description>&lt;P&gt;Just modify the regex to pick the delimiters instead of a comma&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ("[^"]*"\|;\|){3}"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Jul 2016 16:15:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242165#M46949</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2016-07-01T16:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242166#M46950</link>
      <description>&lt;P&gt;you have to use \ before " so the prefix is&lt;BR /&gt;
\"\w+\",\"\w+\",\"\w+\",\"&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 16:18:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242166#M46950</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-07-01T16:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242167#M46951</link>
      <description>&lt;P&gt;Thank you guys, this worked!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 16:19:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242167#M46951</guid>
      <dc:creator>dpanych</dc:creator>
      <dc:date>2016-07-01T16:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not parsing the correct datetime?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242168#M46952</link>
      <description>&lt;P&gt;&lt;A href="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt; is your friend&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 16:22:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-parsing-the-correct-datetime/m-p/242168#M46952</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2016-07-01T16:22:21Z</dc:date>
    </item>
  </channel>
</rss>

