作者:良缘喜铺-小虹 | 来源:互联网 | 2023-08-15 21:14
1下载解压国内镜像wgethttps:mirrors.huaweicloud.comlogstash7.5.1logstash-7.5.1.tar.gz2在bin目录下新建配置
1下载解压国内镜像
wget https://mirrors.huaweicloud.com/logstash/7.5.1/logstash-7.5.1.tar.gz
2在bin目录下新建配置文件logstash.conf,如果实现logstash与springboot整合,使得springboot程序的log存储到logstash中并发送到es中,新建的配置文件可以如下:
input {tcp {mode => "server"host => "0.0.0.0"port => 4560codec => json_lines}
}
output {elasticsearch {hosts => "192.168.65.3:9200"index => "springboot-logstash-%{+YYYY.MM.dd}"}
}
3启动logstash
cd /usr/local/logstash-7.5.1./bin/logstash -f logstash.conf &
参考文章
https://blog.csdn.net/qq_23435961/article/details/108118569
https://blog.csdn.net/weixin_34183910/article/details/91377384
https://blog.csdn.net/syc000666/article/details/98668485