Centos6.5下 logstash5.2.2的安装 + log4j模式 (实践成功)
来源:互联网 发布:linux 绑核 编辑:程序博客网 时间:2024/06/06 02:42
1、下载 logstash-5.2.2.tar.gz
2、解压
tar -zxvf logstash-5.2.2.tar.gz
cd logstash-5.2.2
3、修改 jvm heap 大小
/opt/logstash/logstash-5.2.2/config/jvm.options
4、创建log4j_to_es.conf,内容如下:
# For detail structure of this file
# Set: https://www.elastic.co/guide/en/logstash/current/configuration-file-structure.html
input {
# For detail config for log4j as input,
# See: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-log4j.html
log4j {
mode => "server"
host => "0.0.0.0"
port => 4567
type => "log4j"
}
}
filter {
#Only matched data are send to output.
# Set: https://www.elastic.co/guide/en/logstash/current/configuration-file-structure.html
input {
# For detail config for log4j as input,
# See: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-log4j.html
log4j {
mode => "server"
host => "0.0.0.0"
port => 4567
type => "log4j"
}
}
filter {
#Only matched data are send to output.
mutate{
remove_field => "class"
remove_field => "path"
remove_field => "timestamp"
remove_field => "@version"
}
}
output {
# For detail config for elasticsearch as output,
# See: https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html
elasticsearch {
action => "index" #The operation on ES
hosts => "127.0.0.1:9200" #ElasticSearch host, can be array.
index => "%{type}-%{+YYYY-MM-dd}" #The index to write data to, can be any string.
}
stdout{
codec => rubydebug{}
}
}
remove_field => "class"
remove_field => "path"
remove_field => "timestamp"
remove_field => "@version"
}
}
output {
# For detail config for elasticsearch as output,
# See: https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html
elasticsearch {
action => "index" #The operation on ES
hosts => "127.0.0.1:9200" #ElasticSearch host, can be array.
index => "%{type}-%{+YYYY-MM-dd}" #The index to write data to, can be any string.
}
stdout{
codec => rubydebug{}
}
}
nohup ./logstash -f ../config/log4j_to_es.conf &
0 0
- Centos6.5下 logstash5.2.2的安装 + log4j模式 (实践成功)
- Centos6.5下 logstash5.2.2 插件安装(实践成功)
- Centos6.5下 kibana5.2.2的安装(实践成功)
- Centos6.5下Elasticsearch5.2.1及head插件的安装(实践成功)
- 【LVS实践】centos6.5下nginx安装过程及问题解决
- CentOS6.5安装KVM实践
- tectia 的安装 - 实践成功。
- centos6.5下成功安装jdk环境,并安装tomcat,测试
- 关于centos6.5下的saltstack安装
- Centos6.5下redmine的安装配置
- centos6.5 下smokeping的安装
- Centos6.5 下Filebench 的安装
- centos6.5下的lnmp安装
- CentOS6.5下redis3.2.8的安装
- Centos6.5 下Docker的安装
- Logstash5.6.5安装部署
- [原创]CentOS6.0系统下安装配置openCV成功
- Centos6 下的 nginx 安装
- java泛型详解
- iOS 实现OC与JS(JavaScript)混编
- 状压DP
- Grunt、Gulp区别 webpack、 requirejs区别
- Anbox:容器中的 Android
- Centos6.5下 logstash5.2.2的安装 + log4j模式 (实践成功)
- arguments实参集合&参数&局部变量的关系
- Linux查看硬盘总空间和未分配硬盘大小
- java的对象祖先Object的源码
- 算法和算法分析概念
- Linux入门(1)——Ubuntu16.04安装搜狗拼音
- MySQL数据库的常用操作
- sed的基本使用方法
- 使用MyBatis Generator自动创建代码