1. 构建环境
Elasticsearch环境构建,参照:
Elasticsearch入门
1.1 Logstash环境构建
下载tar.gz包到Linux中并解压:
logstash下载
编辑
config/logstash.conf
文件如下:
input {
tcp {
mode => "server"
host => "0.0.0.0"
port => 5044
codec => json_lines
}
}
output {
elasticsearch {
hosts => ["http://192.168.3.12:9200"]
index => "logstash-%{+YYYY.MM.dd}"
document_type => "_doc"
#flush_size => 200
user => "用户名"
password
版权声明:本文为hushukang原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。