## filebeat

 

*.csv

2019-11-30 23:27:50,111111,222222,VIEW,333333333333

 

filebeat 

filebeat.inputs:
- paths:
- C:\logs\*csv
input_type: log 
multiline.pattern: '^\d'
multiline.negate: true
multiline.match: after

output.elasticsearch:
hosts: ["clusterurl:8888"]
index: "csvindex"
pipeline: test_pipeline

 

es pipleline 

{
  "description" : "xxx-log",
  "processors": [
    {
      "grok": {
        "field": "message",
        "patterns": ["%{TIMESTAMP_ISO8601:log_time},%{NOTSPACE:openid},%{NOTSPACE:fuwuhao},%{NOTSPACE:action},%{GREEDYDATA:content}"]
      }
    },
    {
        "date": {
            "field": "log_time",
            "formats": ["yyyy-MM-dd HH:mm:ss"],
            "timezone": "Asia/Shanghai",
            "target_field": "@timestamp"
        }
    }
  ]
}

 

posted on 2019-12-03 14:19  默西塞德  阅读(672)  评论(0编辑  收藏  举报