我正在尝试配置google云操作系统代理,以便从应用程序中收集日志记录。
我的配置相当高级,但是当日志消息包含多行时会出现问题,例如:
11:18:18,396 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-9) JNDI bindings for session bean named CommonJServiceBinder in deployment unit deployment "jboss-commonj-binder-1.2.jar" are as follows:
java:global/jboss-commonj-binder-1.2/CommonJServiceBinder!com.manh.jboss.commonj.CommonJServiceBinder
java:app/jboss-commonj-binder-1.2/CommonJServiceBinder!com.manh.jboss.commonj.CommonJServiceBinder
java:module/CommonJServiceBinder!com.manh.jboss.commonj.CommonJServiceBinder
java:global/jboss-commonj-binder-1.2/CommonJServiceBinder
java:app/jboss-commonj-binder-1.2/CommonJServiceBinder
java:module/CommonJServiceBinder
在这些情况下,日志浏览器将每一行显示为单独的消息。记录浏览器
我的配置如下:
logging:
receivers:
AS_CA:
type: files
include_paths:
- /home/log/server-startup.log
service:
pipelines:
custom_pipeline_CA:
receivers: [AS_CA]
processors: [TYPE1]
processors:
TYPE1:
type: parse_regex
field: message
regex: "^(?<time>^[0-9]{2}:[0-9]{2}:[0-9]{2}\,[0-9]{3})\s+(?<severity>DEFAULT|DEBUG|INFO|NOTICE|WARNING|WARN|ERROR|CRITICAL|ALERT|EMERGENCY)\s+(?<msg>.*\n)"
发布于 2022-05-25 16:59:29
在您的例子中,看起来parse_multiline
处理器可能会工作。它支持默认的Java日志记录行。
https://stackoverflow.com/questions/71661285
复制相似问题