绊脚石乃是进身之阶。

怎么用log中的时间戳代替@timestamp(不使用logstash)

Elasticsearch | 作者 duyucongc | 发布于2017年12月13日 | 阅读数:3299

日志中有使用时间戳,但是是直接使用filebeat-elasticsearch的模式.所以想用elasticsearch的pipeline来进行处理.
 
有没有,使用管道处理时间戳有经验的,因为我的pipeline如下:


PUT _ingest/pipeline/my-pipeline-05
{
  "description" : "describe pipeline",
  "processors" : [
    {
      "grok": {
        "field": "message",
        "patterns": ["%{TIMESTAMP_ISO8601:logatime}"]
      },
      "date" : {
        "field" : "logatime",
        "target_field": "@timestamp", 
        "formats" : ["yyyy-MM-dd hh:mm:ss.SSS"]
      }
    }
  ]
}


这样的话我虽然解析成功了但是多加了一个字段 有没有什么方法可以不用多加字段的
已邀请:

xinfanwang

赞同来自: duyucongc

有类似mute的功能吧。
https://www.elastic.co/guide/e ... .html

要回复问题请先登录注册