<?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: How do I specify a date+time from a log to be used for event breaking and time stamp purposes? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-specify-a-date-time-from-a-log-to-be-used-for-event/m-p/396291#M70645</link>
    <description>&lt;P&gt;Add the following settings in props.conf should break the event for you and maintain the correct timestamp. &lt;/P&gt;

&lt;P&gt;TIME_FORMAT = %Y-%m-%d %H:%M:%S %p&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:44:46 GMT</pubDate>
    <dc:creator>aromanauskas</dc:creator>
    <dc:date>2020-09-30T00:44:46Z</dc:date>
    <item>
      <title>How do I specify a date+time from a log to be used for event breaking and time stamp purposes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-specify-a-date-time-from-a-log-to-be-used-for-event/m-p/396290#M70644</link>
      <description>&lt;P&gt;Below is an example of a log I want to ingest. I want to end up with 8 events. &lt;BR /&gt;
The timestamp for each event should be the &lt;EM&gt;date+time&lt;/EM&gt; that begins in column 1 for each of the 8 items you see below. The event itself should be the blob of text that follows the date+time that begins in column 1 for each of the 8 items. &lt;/P&gt;

&lt;P&gt;For the &lt;EM&gt;"2019-01-28 12:05:43 PM"&lt;/EM&gt; event, the blob of text that belongs to this event starts with&lt;BR /&gt;
 &lt;CODE&gt;"Submit response(" (i.e., line 2) and ends with ")" (i.e., line 11)&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;Note that the date in the XML element **** (i.e., &lt;STRONG&gt;2019-01-11T12:06:52-05:00&lt;/STRONG&gt; on line 21) is NOT an event date. It's just part of that event's text blob.&lt;/P&gt;

&lt;P&gt;I'm using the web Splunk&amp;gt;enterprise -&amp;gt; Add Data -&amp;gt; Upload dialog to test the ingestion. &lt;BR /&gt;
My trouble is on the &lt;EM&gt;"Set Source Type"&lt;/EM&gt; dialog that shows the preview of the list of "Time" and "Event" data: &lt;BR /&gt;
Since the text blob for an event might include multiple lines of text, I'm using the Regex &lt;BR /&gt;
&lt;CODE&gt;"*\d{4}-\d{2}-\d{2}\s{1}\d{2}:\d{2}:\d{2}(\s{1}\w{2}|))"&lt;/CODE&gt; &lt;BR /&gt;
to define the event break as being the date that begins each event. &lt;/P&gt;

&lt;P&gt;The regex creates the events with the text blob as expected, but the "Time" value for each event is set to the date+time that I ingested the file, not the date+time from the event in the log. &lt;BR /&gt;
By using my Regex to set to event breaks, it seems that Splunk ignores the date+time captured by the Regex.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;How do I specify that the date+time that begins in column 1 for each of the 8 items- is the event break AND have Splunk use it for each event time stamp?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;The log&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-01-28 12:05:42 - Previous Log archived to D:\foo\5.txt
2019-01-28 12:05:43 PM - Submit response(
&amp;lt;?xml version="1.0" encoding="utf-16"?&amp;gt;
&amp;lt;Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;
  &amp;lt;Message&amp;gt;Success: Success: Foo Adapter Submission Plugin - Submission Successful.
Success: The foo bar was successfully submitted to the Foo system.
&amp;lt;/Message&amp;gt;
  &amp;lt;Status&amp;gt;Success&amp;lt;/Status&amp;gt;
  &amp;lt;Success&amp;gt;true&amp;lt;/Success&amp;gt;
&amp;lt;/Response&amp;gt;
)
2019-01-28 12:05:49 PM - UploadDocument(documentType=foo123, filename=test.pdf, fileType=Pdf, content=System.Byte[], uniqueId=282084589)
2019-01-28 12:05:49 PM - O.R. Service validated!
2019-01-28 12:05:49 PM - Chunking D:\foo\test.pdf
2019-01-28 12:05:49 PM - Compressing D:\foo\test.pdf.  Size: 73116
2019-01-28 12:05:49 PM - Compressed size: 66236
2019-01-28 12:05:49 PM - UploadDocument response(
&amp;lt;?xml version="1.0" encoding="utf-16"?&amp;gt;
&amp;lt;ResponseOfGuid xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;
  &amp;lt;Message&amp;gt;The document was successfully uploaded to the Foo Repository.&amp;lt;/Message&amp;gt;
  &amp;lt;DateSubmitted&amp;gt;2019-01-11T12:06:52-05:00&amp;lt;/DateSubmitted&amp;gt;  
  &amp;lt;Status&amp;gt;Success&amp;lt;/Status&amp;gt;
  &amp;lt;Success&amp;gt;true&amp;lt;/Success&amp;gt;
&amp;lt;/ResponseOfGuid&amp;gt;
)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 May 2019 19:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-specify-a-date-time-from-a-log-to-be-used-for-event/m-p/396290#M70644</guid>
      <dc:creator>williamcharlton</dc:creator>
      <dc:date>2019-05-31T19:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I specify a date+time from a log to be used for event breaking and time stamp purposes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-specify-a-date-time-from-a-log-to-be-used-for-event/m-p/396291#M70645</link>
      <description>&lt;P&gt;Add the following settings in props.conf should break the event for you and maintain the correct timestamp. &lt;/P&gt;

&lt;P&gt;TIME_FORMAT = %Y-%m-%d %H:%M:%S %p&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:44:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-specify-a-date-time-from-a-log-to-be-used-for-event/m-p/396291#M70645</guid>
      <dc:creator>aromanauskas</dc:creator>
      <dc:date>2020-09-30T00:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I specify a date+time from a log to be used for event breaking and time stamp purposes?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-specify-a-date-time-from-a-log-to-be-used-for-event/m-p/396292#M70646</link>
      <description>&lt;P&gt;I'm using the web Splunk&amp;gt;enterprise -&amp;gt; Add Data -&amp;gt; Upload dialog (not manually creating .conf files, so I assume your advice is applicable to the Splunk&amp;gt;enterprise -&amp;gt; Add Data -&amp;gt; Upload dialog, correct? &lt;/P&gt;

&lt;P&gt;I also assume you mean for me to STOP using the custom "event break" RegEx and instead use the Timestamp TIME_FORMAT setting?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 13:47:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-specify-a-date-time-from-a-log-to-be-used-for-event/m-p/396292#M70646</guid>
      <dc:creator>williamcharlton</dc:creator>
      <dc:date>2019-06-04T13:47:53Z</dc:date>
    </item>
  </channel>
</rss>

