提问人:Jeyhun F. Aslanov 提问时间:10/3/2023 最后编辑:Jeyhun F. Aslanov 更新时间:10/3/2023 访问量:45
Fluentd 错误日志配置文件格式 RegEX
Fluentd error log config file format RegEX
问:
我的错误:
[warn]: #0 pattern not matched: "Oct 3 17:23:12 dc2prepzeebe03 broker[12925]: {\"severity\":\"DEBUG\",\"logging.googleapis.com/sourceLocation\":{\"function\":\"storeExporterPositions\",\"file\":\"ExporterPositionsDistributionService.java\",\"line\":44},\"message\":\"Received new exporter state {elasticsearch=194745449}\",\"serviceContext\":{\"service\":\"zeebe\",\"version\":\"development\"},\"context\":{\"threadId\":24,\"partitionId\":\"13\",\"threadPriority\":5,\"loggerName\":\"io.camunda.zeebe.broker.exporter\",\"threadName\":\"Broker-2-zb-fs-workers-0\",\"actor-name\":\"Broker-2-Exporter-13\"},\"timestampSeconds\":1696339392,\"timestampNanos\":45148621}"
我的配置文件:
<source>
@type tail
path /var/log/messages
exclude_path /var/log/td-agent/td-agent.log
pos_file /var/log/td-agent/td-agent.pos
tag dc-zeebe-tag
read_from_head true
format ^([^ ]*) (?<host>[^ ]*) [^ ]* "(?<method>\S+) (?<path>[^ ]* +\S*)? (?<code>[^ ]*) (?<size>[^ ]*) (?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?
refresh_intervals 60
<parse>
@type regex
time_format %d:%H:%M:%S
</parse>
</source>
<filter zeebe_log>
@type parser
key_name log_entry
reserve_data true
<parse>
@type regex
time_format %d:%H:%M:%S
</parse>
</filter>
如何解决这个问题?我想在 Elasticsearch 上显示正确的输出。
答: 暂无答案
评论