<?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 to remove binary data from the event in files on a splunk forwarder? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342055#M63016</link>
    <description>&lt;P&gt;Glad you sorted it, and thanks for posting back your solution!&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2018 10:20:21 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2018-02-02T10:20:21Z</dc:date>
    <item>
      <title>How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342047#M63008</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;
On a Splunk forwarder (universal) some of the files monitored contain binary data that we do not want to send to the indexers.&lt;BR /&gt;
It seems impossible to prevent the logging applications on the server from logging these binary parts, so the data is on a Splunk forwarder monitored log on the server.&lt;/P&gt;

&lt;P&gt;The problem is that the binary data is within an event, meaning that the file itself is not binary.&lt;/P&gt;

&lt;P&gt;Is there any way to use the &lt;CODE&gt;props.conf&lt;/CODE&gt; directive &lt;CODE&gt;NO_BINARY_CHECK&lt;/CODE&gt; on these files, or does that only apply to binary files, and not textfiles containing binary sections?&lt;/P&gt;

&lt;P&gt;What would be the best way to remove the binary parts from the event before forwarding it to the indexers?&lt;/P&gt;

&lt;P&gt;When the data enters the indexers it can be removed with SEDCMD, but to save bandwidth, and possibly indexing license, it would be nice if the binary part could be removed before it enters the indexers.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 22:14:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342047#M63008</guid>
      <dc:creator>nsommars</dc:creator>
      <dc:date>2018-01-31T22:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342048#M63009</link>
      <description>&lt;P&gt;Have you tried this in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_name]
NO_BINARY_CHECK = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;NO_BINARY_CHECK = [true|false]&lt;BR /&gt;
    * When set to true, Splunk processes binary files.&lt;BR /&gt;
    * Can only be used on the basis of [&lt;SOURCETYPE&gt;], or [source::&lt;SOURCE&gt;],&lt;BR /&gt;
      not [host::&lt;HOST&gt;].&lt;BR /&gt;
    * Defaults to false (binary files are ignored).&lt;BR /&gt;
    * This setting applies at input time, when data is first read by Splunk.&lt;BR /&gt;
      The setting is used on a Splunk system that has configured inputs&lt;BR /&gt;
      acquiring the data.&lt;/HOST&gt;&lt;/SOURCE&gt;&lt;/SOURCETYPE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342048#M63009</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2020-09-29T17:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342049#M63010</link>
      <description>&lt;P&gt;Well, the file is not binary, and I don't want to process binary data...I wan't do get rid of it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 08:39:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342049#M63010</guid>
      <dc:creator>nsommars</dc:creator>
      <dc:date>2018-02-01T08:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342050#M63011</link>
      <description>&lt;P&gt;SEDCMD occurs before indexing, so it wont come off your licence limit, however if your using a UF it will still be sent across the network. &lt;/P&gt;

&lt;P&gt;You could consider installing a heavy forwarder (either directly on the src system or as an intermediate forwarder) The HF can do the preprocessing which relives your indexers from the workload&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 09:29:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342050#M63011</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2018-02-01T09:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342051#M63012</link>
      <description>&lt;P&gt;if there is any specific data to remove from events then you can use SEDCMD and write regex &lt;BR /&gt;
have a look at &lt;A href="https://answers.splunk.com/answers/83790/how-do-i-remove-x00-characters-from-my-log-message.html"&gt;https://answers.splunk.com/answers/83790/how-do-i-remove-x00-characters-from-my-log-message.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 09:29:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342051#M63012</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-01T09:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342052#M63013</link>
      <description>&lt;P&gt;Thanks!&lt;BR /&gt;
I was a bit confused regarding SEDCMD and where it was applicable. It obviously belongs to props.conf which is parsed by UF...but apparently UF does not support all methods available in props.conf&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 10:04:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342052#M63013</guid>
      <dc:creator>nsommars</dc:creator>
      <dc:date>2018-02-01T10:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342053#M63014</link>
      <description>&lt;P&gt;That's more or less correct... &lt;BR /&gt;
(and it is a bit confusing)&lt;/P&gt;

&lt;P&gt;A UF can 'filter' (event routing, black/whitelisting etc)&lt;BR /&gt;
An HF can 'filter' AND  'pre-process' (transform, sed, re-write) &lt;BR /&gt;
both can be configured in props/transforms/inputs/outputs.&lt;/P&gt;

&lt;P&gt;The difference is that a UF is supposed to be lightweight with small footprint, so features are limited. Heavy Forwarders as the name implies can do a bit more.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 11:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342053#M63014</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2018-02-01T11:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342054#M63015</link>
      <description>&lt;P&gt;Just in case someone has a similar problem:&lt;BR /&gt;
Since an intermediate heavy forwarder was not an option right now, I added a SEDCMD regexp in props.conf on the indexer servers, under the sourcetype stanza that these files belong to.&lt;BR /&gt;
The regexp itself will of course vary depending on how/what the application server logs, but in my case there was a Content-Type: application/octet-stream that started the binary part. the binary then continued to the end of the event which gave:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;SEDCMD-filterbinary = s/(?ms)(?&amp;lt;=Content-Type: application\/octet-stream)(.*$)/\n**Removed binary part**/g&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;which leaves the Content-Type: application\/octet-stream row in the log and replaces the rest with &lt;CODE&gt;**Removed binary part**&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Your mileage may vary! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 14:52:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342054#M63015</guid>
      <dc:creator>nsommars</dc:creator>
      <dc:date>2018-02-01T14:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove binary data from the event in files on a splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342055#M63016</link>
      <description>&lt;P&gt;Glad you sorted it, and thanks for posting back your solution!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 10:20:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-binary-data-from-the-event-in-files-on-a-splunk/m-p/342055#M63016</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2018-02-02T10:20:21Z</dc:date>
    </item>
  </channel>
</rss>

