Logstash Drop header line while csv upload


(scch) #1

Hi, How to drop first header line of csv file ?

i am trying below code.. and want to drop complete document. Please advise..

filter {
if [message] =~ /^Occurred On/ {
drop {}
}
}


How to Remove the header of CSV files with Logstash?
(Magnus Bäck) #2

That looks fine, depending on what the input looks like.


(scch) #3

The CSV input contain 138 fields and one field is Occurred On...


(Magnus Bäck) #4

And that's the first field? Then it should work just fine. Try creating a minimal example that exhibits the problem.


(scch) #5

yup you are right it is not first field...it is working fine now :slight_smile:

filter {
if [message] =~ /^Type/ {
drop {}
}
}


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.