Logstash Output Avro


#1

Is the pipeline config below possible?

input {
beats {
port => "5601"
}
}
filter {
mutate {
remove_field => ["@version","@timestamp","path","host", "beat", "message"]
}
}
output {
stdout {
codec => avro { schema_uri => "/tmp/avrotest.avsc" }
}
}

Getting Error:

{"masked", "masked"=>"masked", "masked"=>"masked"} is not an example of schema


(Konrads Smelkovs) #2

Does a trivial example work at all? Looks like you have a schema error


#3

I Found the schema error but unable to find the right avro data type.

Error:

The datum {"Masked"=>#BigDecimal:662a4aa0,'0.455E2',3(4)} is not an example of schema {"type":"record","name":"outer_record","fields":[{"name":"Masked","type":"double"}]}>

Tried using avro type float, java math decimal and decimal with precision, none worked

can I mutate convert that field so that it will out as double or float not BigDecimal:662a4aa0,'0.455E2',3(4)?


(system) #4

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