gpt4 book ai didi

logging - Kibana 以 JSON 格式记录到 Syslog

转载 作者:行者123 更新时间:2023-12-02 02:37:19 26 4
gpt4 key购买 nike

我今天搭建了一个 ELK 堆栈,一切运行良好,但由于某种原因,Kibana 将其自己的消息以 JSON 格式记录到系统日志中。例如:

Oct 19 18:49:28 elk-host kibana[11111]: {"type":"response","@timestamp":"2016-10-19T17:49:28+00:00","tags":[],"pid":22749,"method":"post","statusCode":200,"req":{"url":"/elasticsearch/logstash*/_field_stats?level=indices","method":"post","headers":{"host":"1.2.3.4:5601","connection":"keep-alive","content-length":"178","accept":"application/json, text/plain, */*","origin":"http://1.2.3.4:5601","kbn-version":"4.4.2","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36","content-type":"application/json;charset=UTF-8","referer":"http://1.2.3.4:5601/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.8"},"remoteAddress":"5.6.7.8","userAgent":"5.6.7.8","referer":"http://1.2.3.4:5601/app/kibana"},"res":{"statusCode":200,"responseTime":11,"contentLength":9},"message":"POST /elasticsearch/logstash*/_field_stats?level=indices 200 11ms - 9.0B"}

所有其他日志均采用正常格式

这是故意的还是我错过了某个地方的 Kibana 设置?

如果这是故意的,我可能会添加一个系统日志过滤器来正确记录它......但希望我不必这样做

最佳答案

在 Kibana 配置文件(config/kibana.yml)中,您可以添加以下(未记录的)设置:

logging.json: false

并且您的 Kibana 日志将不再格式化为 JSON。

关于logging - Kibana 以 JSON 格式记录到 Syslog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40138608/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com