<?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: 2 different timestamps in single log in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12252#M874</link>
    <description>&lt;P&gt;Do I have to concern the windows slashes ( in relation with input paths)&lt;BR /&gt;
I am using :&lt;/P&gt;

&lt;P&gt;[Spectrum_OC_log]&lt;BR /&gt;
DATETIME_CONFIG = C:\Program Files\Splunk\etc\system\local\datetime.xml&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:12:02 GMT</pubDate>
    <dc:creator>Starlette</dc:creator>
    <dc:date>2020-09-28T09:12:02Z</dc:date>
    <item>
      <title>2 different timestamps in single log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12249#M871</link>
      <description>&lt;P&gt;Hai,&lt;/P&gt;

&lt;P&gt;I have lines in single log (1 sourcetype)  started with 2 different timestamps, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timestamp1 - etc etc
timestamp1 - etc etc
timestamp2 - etc etc
timestamp1 - etc etc
timestamp2 - etc etc
timestamp2 - etc etc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;timestamp1 is picked up but timestamp2 one is merged onder timestamp1.
So what the best way to config?&lt;/P&gt;

&lt;P&gt;Cause It looks that the examples are leading to 1 TIME_FORMAT per sourcetype&lt;/P&gt;

&lt;P&gt;Update with sample:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;apr 23, 2010 15:46:28 PM (main) - Deploying module: metadataExchange-1.4 - file:/E:/win32app/SPECTRUM90/tomcat/webapps/axis2/WEB-INF/lib/mex-1.4.jar
apr 23, 2010 15:46:28 PM (main) - Deploying Web service: version.aar - file:/E:/win32app/SPECTRUM90/tomcat/webapps/axis2/WEB-INF/services/version.aar
apr 23, 2010 15:46:28 PM (main) - Deploying web application archive introscope-wssdk-consumer.war
apr 23, 2010 15:46:28 PM (main) - Initialized ConsumerStartupServlet
23-apr-2010 15:46:40 (EhealthIntegrationManager:ServerConfiguration) - EhealthMappingInfo
23-apr-2010 15:46:40 (PoolThread-1: GlobalPool =&amp;gt; SLMStatWatcher.init) (SLM_STAT_DB) - SLM Initialization waiting on MySQL initialization.
23-apr-2010 15:46:40 (EhealthIntegrationManager:ServerConfiguration) - EhealthMappingInfo
23-apr-2010 15:46:40 (PoolThread-1: GlobalPool =&amp;gt; SLMStatWatcher.init) (SLM_STAT_DB) - MySQL Initialization complete. SLM Initializing.
apr 23, 2010 15:46:40 PM (EhealthIntegrationManager:ServerConfiguration) - Commons Collections 3.x available
apr 23, 2010 15:46:40 PM (EhealthIntegrationManager:ServerConfiguration) - Loading XML bean definitions from dataAccessContext.xml
apr 23, 2010 15:46:41 PM (EhealthIntegrationManager:ServerConfiguration) - Schema change summary for "eHealth Integration"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I indeed discovered that the timestamp reconizing is a one to one action,,,so you mention that I have to split this log to different souretypes?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2010 17:52:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12249#M871</guid>
      <dc:creator>Starlette</dc:creator>
      <dc:date>2010-04-25T17:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: 2 different timestamps in single log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12250#M872</link>
      <description>&lt;P&gt;Configuration of timestamps in props.conf will only allow you to specify one timestamp format. You can simply &lt;EM&gt;not&lt;/EM&gt; specify a timestamp format, and Splunk will try to match any of the many that are in its default config for guessing. This is easy to do, but it might be undesireable and result in items that are not timestamps being picked up too readily. However, if you can use this method (perhaps in conjuction with setting &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt;, which looks to me like you can set &lt;CODE&gt;^&lt;/CODE&gt;, and &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt;, which should be set to the max length of the timestamps, then you might prefer this method.&lt;/P&gt;

&lt;P&gt;Otherwise, you can do this creating a custom &lt;CODE&gt;datetime.xml&lt;/CODE&gt; config file and setting &lt;CODE&gt;DATETIME_CONFIG&lt;/CODE&gt; to point to this file. This file format is what Splunk uses for its default format, but it not that well documented unfortunately, but it's not as complicated as it seems. If you provide examples your timestamp formats, perhaps someone here can post a corresponding datetime.xml sample.&lt;/P&gt;

&lt;P&gt;Update: This datetime config, if put into an XML file that is set as the &lt;CODE&gt;DATETIME_CONFIG&lt;/CODE&gt; should work with the sample data provided:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;

&amp;lt;define name="_mydatetimeformat1" extract="litmonth, day, year, hour, minute, second, ampm"&amp;gt;
    &amp;lt;text&amp;gt;^(\w+)\s*(\d{1,2}),\s*(\d{4})\s*(\d{1,2}):(\d{2}):(\d{2})\s*(\w+)&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;
&amp;lt;define name="_mydatetimeformat2" extract="day, litmonth, year, hour, minute, second"&amp;gt;
    &amp;lt;text&amp;gt;^(\d{1,2})-(\w+)-(\d{4})\s+(\d{1,2}):(\d{2}):(\d{2})&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;timePatterns&amp;gt;
      &amp;lt;use name="_mydatetimeformat1"/&amp;gt;
      &amp;lt;use name="_mydatetimeformat2"/&amp;gt;
&amp;lt;/timePatterns&amp;gt;
&amp;lt;datePatterns&amp;gt;
      &amp;lt;use name="_mydatetimeformat1"/&amp;gt;
      &amp;lt;use name="_mydatetimeformat2"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;

&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Apr 2010 23:17:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12250#M872</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-04-25T23:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: 2 different timestamps in single log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12251#M873</link>
      <description>&lt;P&gt;if you post a few examples of your timestamps, someone might be able to show you a sample configuration to match them.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2010 23:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12251#M873</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-04-25T23:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: 2 different timestamps in single log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12252#M874</link>
      <description>&lt;P&gt;Do I have to concern the windows slashes ( in relation with input paths)&lt;BR /&gt;
I am using :&lt;/P&gt;

&lt;P&gt;[Spectrum_OC_log]&lt;BR /&gt;
DATETIME_CONFIG = C:\Program Files\Splunk\etc\system\local\datetime.xml&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12252#M874</guid>
      <dc:creator>Starlette</dc:creator>
      <dc:date>2020-09-28T09:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: 2 different timestamps in single log</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12253#M875</link>
      <description>&lt;P&gt;Spectrum and Ehealth!  I'm pulling in Performance Center data...&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 21:09:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/2-different-timestamps-in-single-log/m-p/12253#M875</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2014-01-31T21:09:28Z</dc:date>
    </item>
  </channel>
</rss>

