<?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: Date parsing incorrect in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396789#M115220</link>
    <description>&lt;P&gt;This behavior is perhaps due to the default value of 2000 days for the &lt;CODE&gt;MAX_DAYS_AGO&lt;/CODE&gt; setting in props.conf.&lt;/P&gt;

&lt;P&gt;It interprets the last block of the ip address as the year, but because that is outside the acceptable range, it perhaps takes the other timestamp for which it doesn't find a year? 2010 is more than 2000 days ago, while 2015 isn't.&lt;/P&gt;

&lt;P&gt;Anyway, you can also write the timestamp extraction config in a &lt;CODE&gt;[source::...]&lt;/CODE&gt; stanza, or even a &lt;CODE&gt;[host::..]&lt;/CODE&gt; stanza, such that you can apply it more specifically to this data source.&lt;/P&gt;</description>
    <pubDate>Sat, 12 May 2018 09:41:40 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-05-12T09:41:40Z</dc:date>
    <item>
      <title>Date parsing incorrect</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396784#M115215</link>
      <description>&lt;P&gt;I have logs from two Unifi switches. One parses the date just fine, the other gets the year messed up, but parses the rest correctly. How come this is happening?&lt;/P&gt;

&lt;P&gt;On the one that works fine, shows the correct date of 05/11/18:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4954iD13B22ABCC897B81/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;But this one does not, notice the year is incorrect. This one shows a date of 05/11/15 instead of 05/11/18 like it should:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4955i7344BE5802960226/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Since they both use the same source/sourcetype, and other hosts share this same source/sourcetype with various other date formats, I really don't want to hardcode anything unless I can also hardcode a reference to the host ip address.&lt;/P&gt;

&lt;P&gt;Any ideas why the parsing isn't working correctly? I find it odd that it parses 192.168.10.10 correctly but then thinks 192.168.10.15 is a reference to a year.&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 18:34:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396784#M115215</guid>
      <dc:creator>bdf0506</dc:creator>
      <dc:date>2018-05-11T18:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date parsing incorrect</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396785#M115216</link>
      <description>&lt;P&gt;Have you configured any timestamp extraction rules for your sourcetype? Splunk recommends you should. That way data from all hosts will be parsed correctly. Right now there are multiple timestamp in non-standard format in your logs and with no explicit timestamp extraction rules being setup, Splunk may get confused in extracting automatically.&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 18:50:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396785#M115216</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-11T18:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date parsing incorrect</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396786#M115217</link>
      <description>&lt;P&gt;In doing so, i suppose I would need to change the sourcetypes of these so that I can do that. I've never done much with that, but suppose I could. "generic_single_line" likely shouldnt really be used to begin with and I likely should put these in correct sourcetypes.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:31:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396786#M115217</guid>
      <dc:creator>bdf0506</dc:creator>
      <dc:date>2020-09-29T19:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date parsing incorrect</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396787#M115218</link>
      <description>&lt;P&gt;That would give you much more control on what you want to do with your data. There are several posts which talk about line breaking and timestamp parsing. Listing few of those for reference.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/654502/line-break-help-with-incoming-logging-data.html"&gt;https://answers.splunk.com/answers/654502/line-break-help-with-incoming-logging-data.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/37583/should-linemerge-break.html"&gt;https://answers.splunk.com/answers/37583/should-linemerge-break.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Also, these documentation link would give more details on event breaking and timestamp extraction:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.0/Data/Configureeventlinebreaking"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.0/Data/Configureeventlinebreaking&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.0/Data/Handleeventtimestamps"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.0/Data/Handleeventtimestamps&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 20:44:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396787#M115218</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-11T20:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date parsing incorrect</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396788#M115219</link>
      <description>&lt;P&gt;You might get an easy success by using the sourcetype syslog. Syslog often uses the old timestamp style, without year and timezone, and that might end up in bad timestamp detection unless you use sourcetype syslog. &lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 21:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396788#M115219</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-11T21:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date parsing incorrect</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396789#M115220</link>
      <description>&lt;P&gt;This behavior is perhaps due to the default value of 2000 days for the &lt;CODE&gt;MAX_DAYS_AGO&lt;/CODE&gt; setting in props.conf.&lt;/P&gt;

&lt;P&gt;It interprets the last block of the ip address as the year, but because that is outside the acceptable range, it perhaps takes the other timestamp for which it doesn't find a year? 2010 is more than 2000 days ago, while 2015 isn't.&lt;/P&gt;

&lt;P&gt;Anyway, you can also write the timestamp extraction config in a &lt;CODE&gt;[source::...]&lt;/CODE&gt; stanza, or even a &lt;CODE&gt;[host::..]&lt;/CODE&gt; stanza, such that you can apply it more specifically to this data source.&lt;/P&gt;</description>
      <pubDate>Sat, 12 May 2018 09:41:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396789#M115220</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-05-12T09:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Date parsing incorrect</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396790#M115221</link>
      <description>&lt;P&gt;I was able to get a quick win here by modifying the udp/514 settings. It was set to "generic_single_line", and setting it to "syslog" appears to have corrected this.&lt;/P&gt;

&lt;P&gt;Thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/110013"&gt;@xpac&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:31:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-parsing-incorrect/m-p/396790#M115221</guid>
      <dc:creator>bdf0506</dc:creator>
      <dc:date>2020-09-29T19:31:47Z</dc:date>
    </item>
  </channel>
</rss>

