[英]what is the reason for this logstash error : exception=>#< "LogStash" ::Json::ParserError: Unexpected end-of-input in VALUE_STRING
我有以下日志行
{"code":200,"message":"ok","responseBody":{"token":"asdadqwrqwkjrqwejr"},"time":"4545425244"}
並使用 logstash json 插件解析此日志,但 logstash 在 logstash-plain.log 中顯示以下錯誤:
exception=>#< "LogStash" ::Json::ParserError: Unexpected end-of-input in VALUE_STRING
問題是什么 ? 謝謝
例外
Unexpected end-of-input in VALUE_STRING
當解析器在嘗試讀取值時到達要解析的文本的末尾時拋出。 例如,以下將產生該錯誤,因為它缺少右雙引號。
input { generator { count => 1 lines => [ '{"message":"ok}' ] } }
filter { json { source => "message" remove_field => [ "message" ] } }
output { stdout { codec => rubydebug { metadata => false } } }
如果在讀取字段名稱時文本用完,則異常將是Unexpected end-of-input in field name
(對於{"message}
會發生這種情況)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.