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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...