0
点赞
收藏
分享

微信扫一扫

Centos 7.9下Logstash安装


logstash下载地址:​​https://www.elastic.co/cn/downloads/logstash​​​

[root@ansible ~]# tar xvf /tmp/logstash-7.15.1-linux-x86_64.tar.gz -C /
[root@ansible ~]# mv /logstash-7.15.1/ /logstash

修改logstash的配置文件
vi /logstash/conf/jvm.options
1.修改jvm的配置

-Xms1g
-Xmx1g

2.修改logstash.yml配置

node.name: logstash-01
pipeline.id: main
pipeline.ordered: auto
pipeline.workers: 10
config.reload.automatic: true
http.host: 127.0.0.1
http.port: 9201
queue.type: memory
8-13:-XX:+UseG1GC

3、编写一个pipeline文件

[root@ansible logstash]# cat pipeline.conf/demo-std.conf 
input {
stdin {
codec => plain {
charset => "UTF-8"
}
type => "console input"
tags => ["console"]
}
}


filter {
}

output {
stdout {
codec => rubydebug {

}
}
}

4.启动logstash

bin/logstash -f pipeline.conf/demo-std.conf

输入Hello logstash.

Hello logstash.
{
"@version" => "1",
"type" => "console input",
"tags" => [
[0] "console"
],
"@timestamp" => 2021-10-31T12:48:43.770Z,
"host" => "ansible",
"message" => "Hello logstash."
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

ELK

举报

相关推荐

0 条评论