Logstash avro reader gives empty results

I want to read a avro files from kafka topics and insert into elastic search.
when I am reading avro files and showing results(codec=>json) ,it gives empty.
below is my configuration:

input
{
kafka {
bootstrap_servers =>"servers"
topics => ["topic"]
group_id => "group id"
auto_offset_reset => "latest"


    codec => avro {
        schema_uri => "/app/kn00/logstash-7.0.0/schemas/abc/abc_schema_writer.avsc"
    }

jaas_path => "/app/logstash-7.0.0/zookeeper-jaas_tmx.conf"
sasl_kerberos_service_name => "kafka"
kerberos_config => "/app/logstash-7.0.0/krb5.conf"
#sasl_mechanism => "PLAIN"
security_protocol => "SASL_SSL"
ssl_truststore_location => "/app/kafka-security.jks"
ssl_truststore_password => ""
}
}

output {

stdout{ codec => json }


    elasticsearch {
      hosts => ['url']
       user => 'abcedf'
       password => ''
       ssl => true
       truststore => "/app/kafka-security.jks"
      truststore_password => ""
       index => "dev_abc_error"
      # document_id => ""
       document_type => "_doc"
 }}

and the output is like below:
/app/logstash-7.0.0/vendor/bundle/jruby/2.5.0/gems/awesome_print-1.7.0/lib/awesome_print/formatters/base_formatter.rb:31: warning: constant ::Fixnum is deprecated
{
"name" => "",
"value" => "",
"@version" => "1",
"@timestamp" => 2019-06-03T17:19:31.204Z
}
{
"name" => "",
"value" => "",
"@version" => "1",
"@timestamp" => 2019-06-03T17:19:31.221Z
}

I am able to read the same avro records using NiFi and able to index into elastic search.

thanks for reading and helping

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