<?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: Multiple log formats in a single log file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26202#M4293</link>
    <description>&lt;P&gt;Note that even with datetime.xml properly sited with the right permissions, Splunk will develop an affinity for the format rule for a given input stream. This means that a combined log file, with several different time stamp formats, will end up having correct time stamps for those that match its preferred time stamp, and "weird" or "matched to adjacent log event" time stamps for those that are in a different format.&lt;/P&gt;

&lt;P&gt;If at all possible, you should split the log streams, or agree upon a consistent time format.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Aug 2013 15:03:26 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2013-08-06T15:03:26Z</dc:date>
    <item>
      <title>Multiple log formats in a single log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26200#M4291</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;
I've log file with multiple log formats.&lt;BR /&gt;
sample.log file&lt;/P&gt;

&lt;P&gt;Type 1:&lt;/P&gt;

&lt;P&gt;[Thu May 31 13:27:14 2012] FATAL: WARNING: The current transaction ID is Oxfwq3SgJS. Run local database&lt;BR /&gt;
repair with rebuild database option enabled to fix it before it reaches allowed limit cf transactions&lt;BR /&gt;
(Oxqfhhe320)&lt;/P&gt;

&lt;P&gt;[Thu May 31 14:01:38 2012] FATAL: WARNING: The current transaction ID is Oxeap54lh7. Run local database&lt;BR /&gt;
repair with rebuild database option enabled to fix it before it reaches allowed limit cf transactions&lt;BR /&gt;
(Oxfqfhhe 020)&lt;/P&gt;

&lt;P&gt;Type 2:&lt;/P&gt;

&lt;P&gt;3996491294 ZONE: &lt;A href="90.21.103.1:42009" target="_blank"&gt;2012/06/01 9:54:21.599&lt;/A&gt; (Oxjun3l:0x63) Sending search result entry&lt;BR /&gt;
“docsismacaddr—1\,6\,00:l5:dl:al:ed:c9,ou—IKV,ou—NorthWest,o--General” to connection 0x973fw410&lt;/P&gt;

&lt;P&gt;3996491294 ZONE: [2012/06/01 9:54:21.599) (90.21.103.1:42009) (Oxjun3l:0x63) Sending operation result&lt;BR /&gt;
0:MM:1 to connection 3x972fw410&lt;/P&gt;

&lt;P&gt;Type 3:&lt;/P&gt;

&lt;P&gt;[-- DRost Logging STARTED Fri Jun 1 02:47:47 2012 -- ]&lt;/P&gt;

&lt;P&gt;[-- DRost Logging STARTED Fri Jun 1 03:07:35 2012 -- ]&lt;/P&gt;

&lt;P&gt;Type 4:&lt;/P&gt;

&lt;P&gt;Jun 01 02:45:35 NDS iMonitor for Novell eDirectory 9.9.5 SP5 v20506.01 SI’S started successfully.&lt;/P&gt;

&lt;P&gt;Jun 01 03:09:27 &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;conf files:&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt; in system/local directory to load the sample.log in splunk&lt;/P&gt;

&lt;P&gt;[monitor://D:\sample.log]&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;[Mysourcetype]&lt;/P&gt;

&lt;P&gt;DATETIME_CONFIG = /etc/system/datetime.xml&lt;/P&gt;

&lt;P&gt;LINE_BREAKER = ([\r\n])+(?=([\w{3}\s(\w{3})\s(\d{1,2})\s(\d{2}):(\d{2}):(\d{2})\s(\d{4})]|\d{10}:?\s\w{4}:|[\s--\s|\w{3}\s\d{2}\s\d{2}:\d{2}:\d{2}\s\s))&lt;/P&gt;

&lt;P&gt;SHOULD_LINEMERGE=false&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;datetime.xml in /etc/system/datetime.xml&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;datetime&amp;gt;&lt;BR /&gt;
!-- [Sat May 31 13:27:14 2012] --&amp;gt;&lt;BR /&gt;
define name="_datetimeformat1" extract="litmonth, day, hour, minute, second, year"&amp;gt;&lt;/P&gt;

&lt;P&gt;text&amp;gt;[\w{3}\s(\w{3})\s(\d{1,2})\s(\d{2}):(\d{2}):(\d{2})\s(\d{4})]&lt;/P&gt;

&lt;P&gt;/define&amp;gt;&lt;BR /&gt;
!-- [2012/06/01 8:54:21.599] --&amp;gt;&lt;BR /&gt;
define name="_datetimeformat2" extract="year, month, day, hour, minute, second, subsecond"&amp;gt;&lt;/P&gt;

&lt;P&gt;text&amp;gt;[(\d{4})/(\d{2})/(\d{2})\s\s(\d{1,2}):(\d{2}):(\d{2}).(\d{3})]&lt;/P&gt;

&lt;P&gt;/define&amp;gt;&lt;/P&gt;

&lt;P&gt;!-- Fri Jun  1 02:47:47 2012 --&amp;gt;&lt;/P&gt;

&lt;P&gt;define name="_datetimeformat3" extract="litmonth, day, hour, minute, second, year"&amp;gt;&lt;/P&gt;

&lt;P&gt;text&amp;gt;\s\w{3}\s(\w{3})\s\s?(\d{1,2})\s(\d{2}):(\d{2}):(\d{2})\s(\d{4})&lt;/P&gt;

&lt;P&gt;/define&amp;gt;&lt;/P&gt;

&lt;P&gt;!-- Jun 01 02:45:35  NDS iMonitor for Novell eDirectory 8.8.5 SP5 v20506.01 SP5 started successfully. --&amp;gt;&lt;/P&gt;

&lt;P&gt;define name="_datetimeformat4" extract="month, day, hour, minute, second"&amp;gt;&lt;/P&gt;

&lt;P&gt;text&amp;gt;(\w{3})\s(\d{2})\s(\d{2}):(\d{2}):(\d{2})\s\s&lt;/P&gt;

&lt;P&gt;/define&amp;gt;&lt;/P&gt;

&lt;P&gt;timePatterns&amp;gt;&lt;/P&gt;

&lt;P&gt;use name="_datetimeformat1"/&amp;gt;&lt;/P&gt;

&lt;P&gt;use name="_datetimeformat2"/&amp;gt;&lt;/P&gt;

&lt;P&gt;use name="_datetimeformat3"/&amp;gt;&lt;/P&gt;

&lt;P&gt;use name="_datetimeformat4"/&amp;gt;&lt;BR /&gt;
/timePatterns&amp;gt;&lt;BR /&gt;
datePatterns&amp;gt;&lt;BR /&gt;
use name="_datetimeformat1"/&amp;gt;&lt;/P&gt;

&lt;P&gt;use name="_datetimeformat2"/&amp;gt;&lt;/P&gt;

&lt;P&gt;use name="_datetimeformat3"/&amp;gt;&lt;/P&gt;

&lt;P&gt;use name="_datetimeformat4"/&amp;gt;&lt;/P&gt;

&lt;P&gt;/datePatterns&amp;gt;&lt;/P&gt;

&lt;P&gt;/datetime&amp;gt;&lt;/P&gt;

&lt;P&gt;while restarting splunk i'm getting error as&lt;/P&gt;

&lt;P&gt;error while parsing 'C:\program files....\datetime.xml&lt;/P&gt;

&lt;P&gt;[Errno 13] permission denied: 'C:\program files....\datetime.xml&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Please tell me where is the problem?&lt;/LI&gt;
&lt;LI&gt;where should put datetime.xml if i dont have custom app&lt;/LI&gt;
&lt;LI&gt;IS this way to load log file with multiple formats?&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:30:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26200#M4291</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2020-09-28T14:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple log formats in a single log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26201#M4292</link>
      <description>&lt;P&gt;You can put in the local system folder of splunk. &lt;/P&gt;

&lt;P&gt;Please follow the documentation:&lt;BR /&gt;
&lt;A href="http://blogs.splunk.com/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filename/"&gt;http://blogs.splunk.com/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filename/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2013 13:14:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26201#M4292</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-08-06T13:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple log formats in a single log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26202#M4293</link>
      <description>&lt;P&gt;Note that even with datetime.xml properly sited with the right permissions, Splunk will develop an affinity for the format rule for a given input stream. This means that a combined log file, with several different time stamp formats, will end up having correct time stamps for those that match its preferred time stamp, and "weird" or "matched to adjacent log event" time stamps for those that are in a different format.&lt;/P&gt;

&lt;P&gt;If at all possible, you should split the log streams, or agree upon a consistent time format.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2013 15:03:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26202#M4293</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-08-06T15:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple log formats in a single log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26203#M4294</link>
      <description>&lt;P&gt;Even after placing it in local system folder the error&lt;BR /&gt;
[Error 13] Permission Denied : \path\ datetime.xml persists.&lt;BR /&gt;
 Is there any other way to load this kind of log file(with multiple formats) without using datetime.xml&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2013 10:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26203#M4294</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-08-07T10:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple log formats in a single log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26204#M4295</link>
      <description>&lt;P&gt;Check the file permissions on the file; if it's not readable by Splunk, it won't be read, regardless of where it is located.&lt;/P&gt;

&lt;P&gt;And even &lt;EM&gt;with&lt;/EM&gt; datetime.xml, it's likely that you won't be able to load this multi-format log file successfully, per my response below.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2013 12:28:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26204#M4295</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-08-07T12:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple log formats in a single log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26205#M4296</link>
      <description>&lt;P&gt;So there is no other way to load multi-format log file? &lt;BR /&gt;
We don't want split the log file into 4 different files(one file for each format).&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 05:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26205#M4296</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-08-08T05:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple log formats in a single log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26206#M4297</link>
      <description>&lt;P&gt;/etc/system/datetime.xml is this the way to specify  DATETIME_CONFIG in windows?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 09:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-log-formats-in-a-single-log-file/m-p/26206#M4297</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-08-14T09:16:14Z</dc:date>
    </item>
  </channel>
</rss>

