<?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: Cannot get custom sourcetype to do line breaks correctly in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-get-custom-sourcetype-to-do-line-breaks-correctly/m-p/395443#M70529</link>
    <description>&lt;P&gt;Hi @bobryant&lt;/P&gt;

&lt;P&gt;You said that you put the inputs.conf and props.conf on the UF. is that correct?&lt;/P&gt;

&lt;P&gt;If yes it's explainable why the linebreaking doesnt work. your props.conf should be located on the first Splunk Enterprise Instance. This instance is responsible for the parsing and will do the linebreaking and timestamp extraction. This can be either a HF or a Indexer. &lt;/P&gt;

&lt;P&gt;I just noticed that you use the &lt;CODE&gt;BREAK_ONLY_BEFORE&lt;/CODE&gt; parameters. I would exchange it with &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; and &lt;CODE&gt;SHOULD_LINEMERGE=false&lt;/CODE&gt; . This way you get more performance out of Splunk and is also best practice doing that. &lt;/P&gt;

&lt;P&gt;The config could look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[appx:ipro]
LINE_BREAKER = ([\r\n]+)\d{2}:\d{2}:\d{2}\.\d{3}
MAX_TIMESTAMP_LOOKAHEAD = 30
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Feb 2019 11:54:12 GMT</pubDate>
    <dc:creator>markusspitzli</dc:creator>
    <dc:date>2019-02-27T11:54:12Z</dc:date>
    <item>
      <title>Cannot get custom sourcetype to do line breaks correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-get-custom-sourcetype-to-do-line-breaks-correctly/m-p/395442#M70528</link>
      <description>&lt;P&gt;We have Splunk Enterprise with SH, Clustered IX (2), HF and many UFs.  I have created an app in the deployment apps folder (with inputs.conf and props.conf) on deployment manager and deployed to server running UF. Ingestion begins as expected but does not line break as desired.&lt;/P&gt;

&lt;P&gt;Log looks like this:&lt;BR /&gt;
...........................&lt;BR /&gt;
ipro Trace started on Thursday, July 12, 2018 at 8:16:12 PM Central Daylight Time(en-US)&lt;BR /&gt;
Machine: P-XXXXXXX, Culture: en-US, UI Culture: en-US&lt;BR /&gt;
Ini Settings: &lt;/P&gt;

&lt;P&gt;20:16:12.672 Tid=4,Log file created.&lt;/P&gt;

&lt;P&gt;20:16:12.679 Tid=4,Running module as Windows Service&lt;/P&gt;

&lt;P&gt;20:16:12.680 Tid=4,Product version: 7.99.999.9331&lt;/P&gt;

&lt;P&gt;20:16:12.813 Tid=9,Conn=1,ElapseMs=0,ipro:Received&lt;BR /&gt;
RequestOnly, PingToClient, HeaderSize=4, DataSize=0&lt;/P&gt;

&lt;P&gt;20:16:12.813 Tid=4,Conn=1,ElapseMs=1,ipro:Sent&lt;BR /&gt;
RequestResponse, Connect, HeaderSize=43, DataSize=269&lt;BR /&gt;
............................&lt;/P&gt;

&lt;P&gt;Splunk appears to get that the date stamp is in the first row of the log file and that the time stamps appear at the beginning of each row. the problem is line breaking. I want it to break at each time stamp allowing for multi-line log entries to merge into one event.&lt;/P&gt;

&lt;P&gt;I have tried a number of different options in the props.conf file and specified several different regex. Nothing I do seems to change the outcome. I wonder if I am deploying this correctly. It seems to randomly break lines, where most of the them time there are two or more log entries in each Splunk event. the number log entries in each event is not consistent so I do not know what it is breaking on.&lt;/P&gt;

&lt;P&gt;Here is inputs.conf&lt;BR /&gt;
...........................&lt;BR /&gt;
[monitor://c:\ProgramData\XXX\XXXXXXX\ipro\XXXX\]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
index = ipro&lt;BR /&gt;
followtail = 0&lt;BR /&gt;
sourcetype = appx:ipro&lt;BR /&gt;
whitelist = \.txt$&lt;BR /&gt;
ignoreOlderThan = 0d&lt;BR /&gt;
...................................&lt;/P&gt;

&lt;P&gt;here is props.conf&lt;BR /&gt;
..................................&lt;BR /&gt;
[appx:ipro]&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = false&lt;BR /&gt;
BREAK_ONLY_BEFORE = [0-9]{2}:[0-9]{2}:[0-9]{2}\.&lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 80&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
category = Custom&lt;BR /&gt;
description = ipro logs&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
........................................&lt;/P&gt;

&lt;P&gt;Any suggestions would be helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:48:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cannot-get-custom-sourcetype-to-do-line-breaks-correctly/m-p/395442#M70528</guid>
      <dc:creator>bobryant</dc:creator>
      <dc:date>2020-09-29T20:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get custom sourcetype to do line breaks correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-get-custom-sourcetype-to-do-line-breaks-correctly/m-p/395443#M70529</link>
      <description>&lt;P&gt;Hi @bobryant&lt;/P&gt;

&lt;P&gt;You said that you put the inputs.conf and props.conf on the UF. is that correct?&lt;/P&gt;

&lt;P&gt;If yes it's explainable why the linebreaking doesnt work. your props.conf should be located on the first Splunk Enterprise Instance. This instance is responsible for the parsing and will do the linebreaking and timestamp extraction. This can be either a HF or a Indexer. &lt;/P&gt;

&lt;P&gt;I just noticed that you use the &lt;CODE&gt;BREAK_ONLY_BEFORE&lt;/CODE&gt; parameters. I would exchange it with &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; and &lt;CODE&gt;SHOULD_LINEMERGE=false&lt;/CODE&gt; . This way you get more performance out of Splunk and is also best practice doing that. &lt;/P&gt;

&lt;P&gt;The config could look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[appx:ipro]
LINE_BREAKER = ([\r\n]+)\d{2}:\d{2}:\d{2}\.\d{3}
MAX_TIMESTAMP_LOOKAHEAD = 30
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Feb 2019 11:54:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cannot-get-custom-sourcetype-to-do-line-breaks-correctly/m-p/395443#M70529</guid>
      <dc:creator>markusspitzli</dc:creator>
      <dc:date>2019-02-27T11:54:12Z</dc:date>
    </item>
  </channel>
</rss>

