相关疑难解决方法(0)

如何从消息字段中删除尾随换行符

我将带有Logstash的Glassfish 4日志文件发送到ElasticSearch接收器.如何从Logstash中删除消息字段中的尾随换行符?

我的活动如下:

{
  "@timestamp" => "2013-11-21T13:29:33.081Z",
  "message" => "[2013-11-21T13:29:32.577+0000] [glassfish 4.0] [INFO] [] [javax.resourceadapter.mqjmsra.lifecycle] [tid: _ThreadID=142 _ThreadName=Thread-43] [timeMillis: 1385040572577] [levelValue: 800] [[\n  MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter stopped.]]\n",
  "@version" => "1",
  "tags" => ["multiline", "date_filtered"],
  "host" => "myhost",
  "path" => "../server.log"
} 
Run Code Online (Sandbox Code Playgroud)

logstash

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

logstash ×1