Splunk Search

Add Data: A text file is being interpreted as a binary file

jchensor
Communicator

I do realize there is another thread where someone asks the same question, but he solved his problem when he checked his file with a hex editor. I've done the same, and made sure the very first byte in the file is just the first ASCII character of the log file. The "sample data" that Splunk has on their website is formatted similarly, with the first byte just being the first ASCII character of the log file, and I can get that file parsed just fine.

My file name is just "ERRORLOG", so I even changed it to "ERRORLOG.txt" and such. I've used editors like Crimson Editor to save it as a plain text file instead of an Auto Detect file. I've tried all sorts of things, but it's always interpreted as a binary file, according to the splunkd log.

Anyone have any idea what may be the problem?

Thanks, guys.

  • JC
Tags (3)
0 Karma
1 Solution

jchensor
Communicator

Actually, nevermind. I don't know why it didn't immediately become obvious when I opened it up in the hex editor, but the file was formatted in Unicode (Little Endian). As soon as I changed it to ASCII, it was fine.

View solution in original post

0 Karma

jchensor
Communicator

Actually, nevermind. I don't know why it didn't immediately become obvious when I opened it up in the hex editor, but the file was formatted in Unicode (Little Endian). As soon as I changed it to ASCII, it was fine.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...