目录
三、logstah7.6.2安装包以及上述配置——linux
一、filebeat配置
1、filebeat-xtest.yml
filebeat.inputs:
- type: log
enabled: true
paths:
- C:\Users\ma\Desktop\logs\xtest.log
fields:
logfrom: xtest
multiline.type: pattern
multiline.type: pattern
multiline.pattern: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.?\d{3}'
multiline.negate: true
multiline.match: after
output.logstash:
hosts: ["192.168.18.151:5044"]
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
2、filebeat-xcloud.yml
filebeat.inputs:
- type: log
enabled: true
paths:
- C:\Users\ma\Desktop\logs\xcloud.log
fields:
logfrom: xcloud
multiline.type: pattern
multiline.type: pattern
multiline.pattern: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.?\d{3}'
multiline.negate: true
multiline.match: after
output.logstash:
hosts: ["192.168.18.151:5044"]
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
二、logstash配置
1、自定义配置(filebeat配置+jdbc配置)
在logstash目录下创建test文件夹,在test文件夹内创建xcloud.conf 、xtest.conf、user-mysql.conf
1)xcloud.conf
input {
pipeline {
address => xcloud
}
}
filter {
grok {
match => { "message" => "%{TIME