[Solved] Output kafka netflow codec

Hello.
I have been tried integrate logstash and kafka with netflow data.

Before this try, I did integrate logstash, nifi and kafka like below,

input{
  file{
    path =>"*.pcap"
    codec => netflow { versions => [5]}
   }
}
output{
  Send NiFi with UDP or TCP
}

It is works, but integration without nifi is not working like below,

input{
  file{
    path =>"*.pcap"
   }
}
output{
  kafka {
   codec => netflow{ version => [5]}
   topic_id => "topic"
  }
}

If 'codec{}' of netflow is located in 'input{file{', "%{timestamp}, %{host}, %{message}" is printed in kafka consumer. And If 'codec{}' is not located in anywhere, the binary value of netflow can be printed in kafka consumer.

So how can the netflow decoded is printed in kafka consumer?

logstash version : 5.3
kafka version : 0.10

Solved

input{
file{
path =>"*.pcap"
codec => netflow { versions => [5]}
}
}
output{
kafka{
codec => json
topic_id => "test"
}

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