logstash - udp 插件中的 Logstash 多行编解码器抛出错误
问题描述
我正在尝试处理生成多行系统日志数据的logstash 摄取。例子:
事件编号:1234
消息:ABCD
严重性:高
我需要将日志的最终输出作为事件 ID:1234 消息:ABCD 严重性:高。
我尝试使用带有多行编解码器的 UDP 输入插件并抛出如下错误:
[FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<LogStash::Error: Don't know how to handle `Java::JavaLang::IllegalStateException` for `PipelineAction::Create<pipeline-blah>, :backtrace=> ["org/logstash/execution/ConvergeResultExt.java:109:in `create'", "org/logstash/execution/ConvergeResultExt.java:37:in `add'", "/opt/blah/logstash-7.4.2/logstash-core/lib/logstash/agent.rb:339:in `block in converge_state'"]}
Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:pipeline-blah, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init>(CompiledPipeline.java:100)", "org.logstash.execution.JavaBasePipelineExt.initialize(JavaBasePipelineExt.java:60)",......
我正在使用下面提到的输入配置
id => "pipeline_syslog_generic_input_udp"
port => 5514
codec => multiline {
pattern => "^Event ID"
what => "next" } // Also tried changing this to previous
add_field => {
"type" => "generic"
"ingest_port" => "udp/5514"
}
如果我做错了什么或者是否有更好的方法来解决这个问题,请告诉我。
解决方案
推荐阅读
- c# - How to access newly created ItemsControl children controls?
- c# - 使用leaf.xnet出现异常时如何获取HttpRequest的响应
- c# - 无法将 .NET Core 5.0 应用程序与 Visual Studio Community 2019 版本 16.7.5 一起使用
- mysql - MySQL返回查询,但连接没有关闭
- angular - PrimeNG:手动输入时未触发 p-inputNumber onInput
- python - 如何使用 SQL Alchemy 从 INFORMATION_SCHEMA 读取表?
- node.js - hubot Rocketchat 广播通知
- c - 在一行上初始化并返回结构
- mysql - MYSQL - 如何更正 SUBSELECT?
- xpath - Testcafe:有没有办法添加多个文本作为 Selector().withText(text) 的输入 - 应用程序支持多种语言时的问题