After upgrading Logstash 5.6.11 → 6.4.0 when decoding protobuf I get an error:
[WARN ][logstash.codecs.protobuf ] Couldn't decode protobuf: #<ProtocolBuffers::DecodeError: too many bytes when decoding varint>.
Logstash config
input {
http {
id => "AppMon ProtoBuf decode"
port => 8080
codec => protobuf {
class_name => "Export::Bt::BusinessTransactions"
include_path => ['/usr/share/logstash/lib/pluginmanager/dynatrace.rb']
}
}
}
output {
file {
path => "/app/logstash/out/test.out"
}
}
dynatrace.rb
#!/usr/bin/env ruby
# Generated by the protocol buffer compiler. DO NOT EDIT!
require 'protocol_buffers'
module Export
module Bt
# forward declarations
class BusinessTransactions < ::ProtocolBuffers::Message; end
class BusinessTransaction < ::ProtocolBuffers::Message; end
class BtOccurrence < ::ProtocolBuffers::Message; end
class BusinessTransactions < ::ProtocolBuffers::Message
set_fully_qualified_name "export.bt.BusinessTransactions"
repeated ::Export::Bt::BusinessTransaction, :businessTransactions, 1
optional :int32, :lostTransactions, 2
optional :string, :serverName, 3
end
class BusinessTransaction < ::ProtocolBuffers::Message
# forward declarations
# enums
module Type
include ::ProtocolBuffers::Enum
set_fully_qualified_name "export.bt.BusinessTransaction.Type"
PUREPATH = 0
USER_ACTION = 1
VISIT = 2
end
set_fully_qualified_name "export.bt.BusinessTransaction"
required :string, :name, 1
optional ::Export::Bt::BusinessTransaction::Type, :type, 2
optional :string, :application, 3
repeated :string, :measureNames, 4
repeated :string, :dimensionNames, 5
repeated ::Export::Bt::BtOccurrence, :occurrences, 6
optional :string, :systemProfile, 7
end
class BtOccurrence < ::ProtocolBuffers::Message
set_fully_qualified_name "export.bt.BtOccurrence"
required :int64, :startTime, 1
optional :int64, :endTime, 2
optional :string, :purePathId, 5
repeated :double, :values, 6
repeated :string, :dimensions, 7
optional :string, :actionName, 8
optional :string, :url, 9
optional :string, :query, 10
optional :int64, :visitId, 11
optional :string, :user, 12
optional :double, :apdex, 13
optional :bool, :converted, 14
optional :double, :responseTime, 15
optional :double, :cpuTime, 16
optional :double, :syncTime, 17
optional :double, :waitTime, 18
optional :double, :suspensionTime, 19
optional :double, :execTime, 20
optional :double, :duration, 21
optional :bool, :failed, 22
optional :int32, :nrOfActions, 23
optional :string, :clientFamily, 24
optional :string, :clientIP, 25
optional :string, :continent, 26
optional :string, :country, 27
optional :string, :city, 28
optional :int32, :failedActions, 29
optional :int32, :clientErrors, 30
optional :bool, :exitActionFailed, 31
optional :bool, :bounce, 32
optional :string, :osFamily, 33
optional :string, :osName, 34
optional :string, :connectionType, 35
repeated :string, :convertedBy, 36
optional :double, :clientTime, 37
optional :double, :networkTime, 38
optional :double, :serverTime, 39
optional :int32, :urlRedirectionTime, 40
optional :int32, :dnsTime, 41
optional :int32, :connectTime, 42
optional :int32, :sslTime, 43
optional :int32, :documentRequestTime, 44
optional :int32, :documentResponseTime, 45
optional :int32, :processingTime, 46
end
end
end
Please tell me how to fix the problem?