<?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: Why does Splunk think my file is binary in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223625#M43791</link>
    <description>&lt;P&gt;Is your file using something other than the UTF-8 or ASCII character sets? For instance, I had a similar problem with some logs encoded in UTF-16 and had to specify it explicitly.&lt;/P&gt;

&lt;P&gt;See this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/data/Configurecharactersetencoding#Comprehensive_list_of_supported_character_sets"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/data/Configurecharactersetencoding#Comprehensive_list_of_supported_character_sets&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Feb 2016 15:06:06 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2016-02-26T15:06:06Z</dc:date>
    <item>
      <title>Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223620#M43786</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to process a ".log" file on a Windows server, and Splunk keeps ignoring it, stating that it's a binary file. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;02-26-2016 09:26:54.574 -0500 WARN  FileClassifierManager - The file 'C:\Temp\w32tmdebug.log' is invalid. Reason: binary
02-26-2016 09:26:54.574 -0500 INFO  TailReader - Ignoring file 'C:\Temp\w32tmdebug.log' due to: binary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am able to open the file using notepad,  so I'm not sure why Splunk thinks it's binary.  I also tried adding "NO_BINARY_CHECK" but that didn't work either.  My inputs is below.  Any suggestions?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Temp\w32tmdebug.log]
disabled = false
followTail = 0
index = main
sourcetype = ntpdebug_log
ignoreOlderThan = 2d
NO_BINARY_CHECK = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:56:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223620#M43786</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2020-09-29T08:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223621#M43787</link>
      <description>&lt;P&gt;The missing backslash in your filepath could cause problems.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 14:40:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223621#M43787</guid>
      <dc:creator>JMichaelis</dc:creator>
      <dc:date>2016-02-26T14:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223622#M43788</link>
      <description>&lt;P&gt;What kind of data is in your log file? I know PDF files and such are treated as binary &lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 14:58:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223622#M43788</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-02-26T14:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223623#M43789</link>
      <description>&lt;P&gt;it's text.   I can open and edit the file with notepad.   Windows says it's a text file when you look at it in the folder view. &lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 15:03:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223623#M43789</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2016-02-26T15:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223624#M43790</link>
      <description>&lt;P&gt;Hi a212830, the NO_BINARY_CHECK is a props.conf configuration, and so you will want to create a stanza in props like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::C:\Temp\w32tmdebug.log]
NO_BINARY_CHECK = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I'd take a closer look at this log file. The encoding is probably screwy and therefore is throwing off Splunk. Windows logs can be tricky like that.&lt;/P&gt;

&lt;P&gt;Please let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:56:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223624#M43790</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2020-09-29T08:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223625#M43791</link>
      <description>&lt;P&gt;Is your file using something other than the UTF-8 or ASCII character sets? For instance, I had a similar problem with some logs encoded in UTF-16 and had to specify it explicitly.&lt;/P&gt;

&lt;P&gt;See this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/data/Configurecharactersetencoding#Comprehensive_list_of_supported_character_sets"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/data/Configurecharactersetencoding#Comprehensive_list_of_supported_character_sets&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 15:06:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223625#M43791</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-02-26T15:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223626#M43792</link>
      <description>&lt;P&gt;Interestingly, the Out-Of-The-Box props.conf has a number of NO_BINARY_CHECK = 1 within it, such as -&lt;/P&gt;

&lt;P&gt;[WinNetMonMk]&lt;BR /&gt;
KV_MODE = multi_WinNetMonMk&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
pulldown_type = 0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:56:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223626#M43792</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2020-09-29T08:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223627#M43793</link>
      <description>&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/35335128/grep-thinks-text-file-is-binary-but-it-isnt"&gt;http://stackoverflow.com/questions/35335128/grep-thinks-text-file-is-binary-but-it-isnt&lt;/A&gt; speaks about the issue.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 23:46:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223627#M43793</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-02-26T23:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223628#M43794</link>
      <description>&lt;P&gt;I love all the answers and ideas posted here. I think I've come across this in the past and the root cause was the same as other folks on this thread have posted.&lt;/P&gt;

&lt;P&gt;Here's some details on what I remember I did to determine if encoding was the cause:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Create a copy of the file (so you can muck around with it without impacting the production version)&lt;/LI&gt;
&lt;LI&gt;Create a new monitor stanza, same as the old, for the new copy of the file. Validate that it still shows as "binary" when Splunk goes for it. This is a base case to make sure we're able to reproduce the problem.&lt;/LI&gt;
&lt;LI&gt;Open the copy in Notepad++. There's an Encoding menu item. I forget if you have to select text first so feel free to select all and then check the encoding menu to see what is currently selected.&lt;/LI&gt;
&lt;LI&gt;Try toggling to UTF-8 or ANSI options and restarting Splunk to see if the file gets indexed (no longer recognized as binary)&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I hope it turns out to be as simple as this. Crossing my fingers.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 00:37:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223628#M43794</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2016-02-27T00:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223629#M43795</link>
      <description>&lt;P&gt;,I have had the same problems as described above.  When I copied the file to notepad++, saw that the file was ANSI, converted it to UTF-8, copied the converted UTF-8 file back and splunk forwarder was able to read/watch the file.  So, I clearly defined the problem but what is my solution? How do I get Splunk to read these files that are created as ANSI?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 14:51:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223629#M43795</guid>
      <dc:creator>druckerg</dc:creator>
      <dc:date>2017-03-24T14:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223630#M43796</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Configurecharactersetencoding"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Configurecharactersetencoding&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;There's a few ANSI options so it looks like some internet research or trial and error testing to see which is right.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 12:21:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223630#M43796</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2017-03-27T12:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223631#M43797</link>
      <description>&lt;P&gt;Here's another approach for determining the file character set: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Troubleshooting/Garbledevents"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Troubleshooting/Garbledevents&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So in this case, FTP the file from Windows to a Unix system to use the &lt;CODE&gt;file&lt;/CODE&gt; command as a way to determine the character set.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 12:22:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223631#M43797</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2017-03-27T12:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223632#M43798</link>
      <description>&lt;P&gt;Below worked for many cases ; Make sure to add it to props.conf on the server where monitor stanza is configured - mostly UF.&lt;BR /&gt;
["source or sourcetype "]&lt;BR /&gt;
NO_BINARY_CHECK=true&lt;BR /&gt;
CHARSET=AUTO&lt;/P&gt;

&lt;P&gt;If it doesn't work then enable DEBUG and open a support ticket along with a diag with DEBUG messages.&lt;BR /&gt;
- Below are the categories to be set to DEBUG&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;./splunk set log-level FileClassifierManager -level DEBUG&lt;BR /&gt;
./splunk set log-level FileClassifier -level DEBUG&lt;BR /&gt;
./splunk set log-level WatchedFile -level DEBUG&lt;BR /&gt;
./splunk set log-level TailingProcessor -level DEBUG&lt;BR /&gt;
./splunk set log-level TailReader -level DEBUG&lt;/EM&gt;  &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223632#M43798</guid>
      <dc:creator>sylim_splunk</dc:creator>
      <dc:date>2020-09-29T18:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk think my file is binary</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223633#M43799</link>
      <description>&lt;P&gt;yes CHARSET=AUTO worked for me .&lt;/P&gt;

&lt;P&gt;So my inputs.conf&lt;/P&gt;

&lt;P&gt;[monitor://C:\Windows\System32\LogFiles\SMTPSVC1]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
index=smtp&lt;BR /&gt;
sourcetype = ms:iis:auto&lt;BR /&gt;
crcSalt = &lt;BR /&gt;
initCrcLength = 512&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[ms:iis:auto]&lt;BR /&gt;
TZ = Australia/Melbourne&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
CHARSET=AUTO&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:25:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-think-my-file-is-binary/m-p/223633#M43799</guid>
      <dc:creator>abheeksett</dc:creator>
      <dc:date>2020-09-30T02:25:45Z</dc:date>
    </item>
  </channel>
</rss>

