<?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 How to remove an invalid line breaker from syslog before indexing? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216637#M42628</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I've got an application sending data to splunk, which are split over multiple lines instead to keep everything on the same line.&lt;/P&gt;

&lt;P&gt;When I redirect my data to a file instead of splunk, I can find that the ascii code #012 is sent as part of the string.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... #012Change details       : #012filewrite#012 ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Which are split in multiples lines in splunk:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
9/29/16 3:25:30.000 AM  filewrite
host = xxx.xxx.xxx.xxx source = udp:3514 sourcetype = syslog
9/29/16 3:25:30.000 AM  Change details       :
host = xxx.xxx.xxx.xxx source = udp:3514 sourcetype = syslog
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there any way to replace the ASCII code #012 before to index it into splunk ?&lt;/P&gt;

&lt;P&gt;I've try to add this config in my props.conf, but it did not solved it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
LINE_BREAKER=#012
SHOULD_LINEMERGE=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And also this one: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
SEDCMD-fim = s/\#012/ /g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for your support.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2016 03:42:39 GMT</pubDate>
    <dc:creator>vlours</dc:creator>
    <dc:date>2016-09-29T03:42:39Z</dc:date>
    <item>
      <title>How to remove an invalid line breaker from syslog before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216637#M42628</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I've got an application sending data to splunk, which are split over multiple lines instead to keep everything on the same line.&lt;/P&gt;

&lt;P&gt;When I redirect my data to a file instead of splunk, I can find that the ascii code #012 is sent as part of the string.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... #012Change details       : #012filewrite#012 ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Which are split in multiples lines in splunk:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
9/29/16 3:25:30.000 AM  filewrite
host = xxx.xxx.xxx.xxx source = udp:3514 sourcetype = syslog
9/29/16 3:25:30.000 AM  Change details       :
host = xxx.xxx.xxx.xxx source = udp:3514 sourcetype = syslog
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there any way to replace the ASCII code #012 before to index it into splunk ?&lt;/P&gt;

&lt;P&gt;I've try to add this config in my props.conf, but it did not solved it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
LINE_BREAKER=#012
SHOULD_LINEMERGE=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And also this one: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
SEDCMD-fim = s/\#012/ /g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for your support.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 03:42:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216637#M42628</guid>
      <dc:creator>vlours</dc:creator>
      <dc:date>2016-09-29T03:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove an invalid line breaker from syslog before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216638#M42629</link>
      <description>&lt;P&gt;The #012 is ascii code for \n, so that is why events are getting split (default LINE_BREAKER is &lt;CODE&gt;([\r\n]+)&lt;/CODE&gt;). You second configuration with SEDCMD will not work as SEDCMD executes after events are broken.&lt;/P&gt;

&lt;P&gt;How does your data looks like when you redirect it to a file (sample entries, mask any sensitive data)? You probably have to setup correct LINE_BREAKER (assuming you're data is directly coming to indexer/heavy forwarder) to split it correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 05:10:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216638#M42629</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-29T05:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove an invalid line breaker from syslog before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216639#M42630</link>
      <description>&lt;P&gt;Hi somesoni2,&lt;/P&gt;

&lt;P&gt;Actually, I did not test it with the default LINE_BREAKER, as I was fighting with my #012 value.&lt;BR /&gt;
Setting the default value LINE_BREAKER and the SHOULD_LINEMERGE is working fine. &lt;/P&gt;

&lt;P&gt;So, I've put the following in my props.conf:&lt;BR /&gt;
&lt;EM&gt;[syslog]&lt;BR /&gt;
LINE_BREAKER=([\r\n]+)&lt;BR /&gt;
SHOULD_LINEMERGE=true&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Thanks a lot.&lt;BR /&gt;
Have a great day.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216639#M42630</guid>
      <dc:creator>vlours</dc:creator>
      <dc:date>2020-09-29T11:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove an invalid line breaker from syslog before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216640#M42631</link>
      <description>&lt;P&gt;As explain by &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;, the #012 is is ascii code for \n&lt;/P&gt;

&lt;P&gt;So to solve it, I've include the following in my props.conf:&lt;BR /&gt;
&lt;EM&gt;[syslog]&lt;BR /&gt;
LINE_BREAKER=([\r\n]+)&lt;BR /&gt;
SHOULD_LINEMERGE=true&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;My data are now merged correctly in one line.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:11:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-an-invalid-line-breaker-from-syslog-before/m-p/216640#M42631</guid>
      <dc:creator>vlours</dc:creator>
      <dc:date>2020-09-29T11:11:33Z</dc:date>
    </item>
  </channel>
</rss>

