119. 使用 Fluentd concat 过滤器插件在牧场日志中串接多行日志
Situation 地理位置Logs of multiple lines are separated across multiple log events within Pod logs and there is a need to combine them into a single event before forwarding them to a logging solution.多行日志在 Pod 日志中被分隔在多个日志事件中因此需要将它们合并为单一事件然后再转发到日志解决方案。Resolution 结局The rancher-logging operator provides a wide range of Fluentd filter plugins. The concat filter can be used to concatenate multiline logs into a single event.牧场记录操作员提供了多种 Fluentd 滤波插件 。concat 过滤器可用于将多行日志串接成单一事件。Filters are defined in a Cluster or ClusterFlow, per the example below:过滤器定义在集群或集群流中示例如下span stylecolor:#000000span stylebackground-color:#ffffffspan stylebackground-color:#efefefcodespec: filters: - concat: flush_interval: 10 multiline_start_regexp: /\d{4}-\d{1,2}-\d{1,2}/ use_first_timestamp: true/code/span/span/spanUsers should refer to the Fluentd concat filter plugin documentation, as well as the kube-logging documentation, to determine the appropriate concat filter parameters to concatenate their application logs.用户应参考 Fluentd concat 过滤器插件文档以及 kube-logging 文档 以确定合适的 concat 过滤器参数以串接他们的应用日志。访问Rancher-K8S解决方案博主企业合作伙伴 https://blog.csdn.net/lidw2009
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2479745.html
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!