Getting Data In

Can i tell splunk not to index the first X lines of a file?

Michael_Wilde
Splunk Employee
Splunk Employee

I have a logfile that has headers in the first two lines of the file. Imagine something like the output of UNIX' "top" command.

FIELD1          FIELD2              FIELD3
------          ---------------     -----------

(auto header extraction won't work well because there "can" be spaces in the info in each field, so i'm manually doing the extractions). I'd just like to not index the first 2 lines of every file.

I could write a nullQueue regex that looks for the text on line 1 and line 2. But just checking to see if there's a setting i don't know about

Thoughts?

Tags (1)
0 Karma

jrodman
Splunk Employee
Splunk Employee

You might be able to abuse a sedcmd to throw them away, or a heavily tweaked LINE_BREAKER.

It might be best to just collect that stuff into an event apart from your real events and transform it into the nullQueue.

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 ...