Commit 66e9c683 by ChongmingDu

添加filebeat注释

parent 11f1e1c3
filebeat.prospectors: filebeat.prospectors:
- input_type: log - input_type: log
paths: paths:
- /opt/tomcat/test-base-service/logs/base-service/base-service.log //日志路径,java中定义的
- /opt/tomcat/test-base-service/logs/base-service/base-service.log
multiline: multiline:
pattern: ^\d{4}\.\d{2}.\d{2} pattern: ^\d{4}\.\d{2}.\d{2}
negate: true negate: true
match: after match: after
fields: fields:
//index名称,根据项目名字-服务名字
doc_type: crmtest-base-service doc_type: crmtest-base-service
output.elasticsearch: output.elasticsearch:
//es的位置,是安装elk模块的机器ip
hosts: ["172.16.162.209:9200"] hosts: ["172.16.162.209:9200"]
//在es里存储index的名字
index: "crmtest-%{+yyyy.MM.dd}" index: "crmtest-%{+yyyy.MM.dd}"
indices: indices:
//在es里存储index的名字。根据项目名字-服务名字
- index: "crmtest-base-service-%{+yyyy.MM.dd}" - index: "crmtest-base-service-%{+yyyy.MM.dd}"
when.contains: when.contains:
//日志的路径,java中定义的
source: "/opt/tomcat/test-base-service/logs/base-service/base-service.log" source: "/opt/tomcat/test-base-service/logs/base-service/base-service.log"
protocol: "http" protocol: "http"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment