简体   繁体   English

Logstash中的消息格式

[英]Message format in Logstash

I am viewing my logstash output and it has: 我正在查看我的logstash输出,它具有:

u0002\\xp\\\\\ u0002 \\ u0000 \\ u0000xp \\ u0000 \\ u0000 \\ u0000 \\

characters. 字符。

I want to be able to view only understandable charsets. 我希望只能查看可理解的字符集。 What changes should I have in my config file? 我的配置文件应该进行哪些更改?

You should take a look at the codecs, eg the JSON codec . 您应该看一下编解码器,例如JSON编解码器 Here you can set a charset depending on the encoding of your input. 在这里,您可以根据输入的编码设置字符集。

Example usage (for ISO-8859-1 charset): 用法示例(对于ISO-8859-1字符集):

input {
    file {
        path => [ "/path/to/logs" ]
        codec => json { charset => "ISO-8859-1" }
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM