在相应的目录下

wget https://artifacts.elastic.co/downloads/logstash/logstash-6.6.2.tar.gz

解压

tar -zxvf  logstash/logstash-6.6.2.tar.gz

在控制台输入 在控制台输出

[root@localhost bin]# ./logstash -e 'input {stdin{}} output {stdout{}}'

将控制台输入写到es上面

[root@localhost bin]# ./logstash -e 'input {stdin{}} output { elasticsearch{hosts=>["192.168.174.130:9200"]}}'
配置文件启动

创建文件

input { stdin { } }

output {
  elasticsearch { hosts => ["localhost:9200"] }
  stdout { codec => rubydebug }
}
home/data/logstash/logstash/bin/logstash -f /home/data/logstash/logstash/config/start.conf

相关文章:

  • 2021-12-03
  • 2021-12-03
  • 2021-09-10
  • 2021-07-02
  • 2021-08-12
  • 2021-06-19
  • 2022-01-18
  • 2021-07-18
猜你喜欢
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
  • 2021-06-22
  • 2021-08-20
相关资源
相似解决方案