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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...